kangpinghuang commented on a change in pull request #643: Import TabletState 
and remove mutex in TabletMeta
URL: https://github.com/apache/incubator-doris/pull/643#discussion_r258305949
 
 

 ##########
 File path: be/src/olap/tablet_meta.h
 ##########
 @@ -91,29 +112,51 @@ class TabletMeta {
                uint64_t shard_id, const TTabletSchema& tablet_schema,
                uint32_t next_unique_id,
                const std::unordered_map<uint32_t, uint32_t>& 
col_ordinal_to_unique_id);
-    OLAPStatus save(const std::string& file_path);
+
+    // Function create_from_file is used to be compatible with previous 
tablet_meta.
+    // Previous tablet_meta is a physical file in tablet dir, which is not 
stored in rocksdb.
     OLAPStatus create_from_file(const std::string& file_path);
+    OLAPStatus save(const std::string& file_path);
+    OLAPStatus save_meta();
 
     OLAPStatus serialize(string* meta_binary) const;
-    OLAPStatus serialize_unlock(string* meta_binary) const;
-
-    OLAPStatus init_from_pb(const TabletMetaPB& tablet_meta_pb);
     OLAPStatus deserialize(const string& meta_binary);
+    OLAPStatus init_from_pb(const TabletMetaPB& tablet_meta_pb);
 
-    OLAPStatus save_meta();
-    OLAPStatus save_meta_unlock();
+    OLAPStatus to_meta_pb(TabletMetaPB* tablet_meta_pb);
+    OLAPStatus to_json(std::string* json_string, json2pb::Pb2JsonOptions& 
options);
 
-    OLAPStatus to_tablet_pb(TabletMetaPB* tablet_meta_pb);
-    OLAPStatus to_tablet_pb_unlock(TabletMetaPB* tablet_meta_pb);
+    inline void set_data_dir(DataDir* data_dir);
 
 Review comment:
   why add this api? why not put it in Constructor? Is there any chance to 
change the data dir of a tablet?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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