imay commented on a change in pull request #1568: initial implementation of 
BetaRowset
URL: https://github.com/apache/incubator-doris/pull/1568#discussion_r310387212
 
 

 ##########
 File path: be/src/olap/rowset/rowset.h
 ##########
 @@ -83,40 +97,47 @@ class Rowset : public std::enable_shared_from_this<Rowset> 
{
 
     virtual std::shared_ptr<RowsetReader> create_reader() = 0;
 
+    // remove all files in this rowset
     virtual OLAPStatus remove() = 0;
 
-    virtual RowsetMetaSharedPtr rowset_meta() const = 0;
-
-    virtual void set_version_and_version_hash(Version version, VersionHash 
version_hash) = 0;
-
     virtual OLAPStatus make_snapshot(const std::string& snapshot_path,
                                      std::vector<std::string>* success_links) 
= 0;
     virtual OLAPStatus copy_files_to_path(const std::string& dest_path,
                                           std::vector<std::string>* 
success_files) = 0;
 
     virtual OLAPStatus remove_old_files(std::vector<std::string>* 
files_to_remove) = 0;
 
-    virtual bool is_pending() const = 0;
-
+    // return whether `path` is one of the files in this rowset
     virtual bool check_path(const std::string& path) = 0;
 
-    virtual std::string unique_id() = 0;
+    // return an unique identifier string for this rowset
+    std::string unique_id() const {
+        return _rowset_path + "/" + std::to_string(rowset_id());
+    }
 
-    bool need_delete_file() {
+    bool need_delete_file() const {
         return _need_delete_file;
     }
 
-    void set_need_delete_file(bool need_delete_file) {
-        if (_need_delete_file == true) {
-            return;
-        }
-        _need_delete_file = need_delete_file;
+    void set_need_delete_file() {
+        _need_delete_file = true;
     }
 
-private:
-    bool _is_inited;
-    bool _is_loaded;
-    bool _need_delete_file;
+protected:
+    // allow subclass to add custom logic when rowset is being published
+    virtual void make_visible_extra(Version version, VersionHash version_hash) 
{}
+
+    const TabletSchema* _schema;
+    std::string         _rowset_path;
 
 Review comment:
   No need to make these align, just one space is enough. This will bring a 
huge work to maintain this 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to