You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/10/12 09:21:25 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #6814: [MemerySave] Change TabletSchema in tablet to reference to save mem

morningman commented on a change in pull request #6814:
URL: https://github.com/apache/incubator-doris/pull/6814#discussion_r726928573



##########
File path: be/src/olap/tablet_meta.cpp
##########
@@ -46,14 +46,14 @@ OLAPStatus TabletMeta::create(const TCreateTabletReq& request, const TabletUid&
     return OLAP_SUCCESS;
 }
 
-TabletMeta::TabletMeta() : _tablet_uid(0, 0) {}
+TabletMeta::TabletMeta() : _tablet_uid(0, 0), _schema(new TabletSchema) {}
 
 TabletMeta::TabletMeta(int64_t table_id, int64_t partition_id, int64_t tablet_id,
                        int32_t schema_hash, 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,
                        TabletUid tablet_uid, TTabletType::type tabletType)
-        : _tablet_uid(0, 0), _preferred_rowset_type(ALPHA_ROWSET) {
+        : _tablet_uid(0, 0), _preferred_rowset_type(ALPHA_ROWSET), _schema(new TabletSchema) {

Review comment:
       ```suggestion
           : _tablet_uid(0, 0), _preferred_rowset_type(BETA_ROWSET), _schema(new TabletSchema) {
   ```

##########
File path: be/src/olap/tablet_meta.cpp
##########
@@ -139,6 +139,24 @@ TabletMeta::TabletMeta(int64_t table_id, int64_t partition_id, int64_t tablet_id
     init_from_pb(tablet_meta_pb);
 }
 
+TabletMeta::TabletMeta(const TabletMeta& b)

Review comment:
       This may be error prone?
   If I add some other fields in tablet meta and forget to modify here?




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org