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 2022/06/01 16:06:45 UTC

[GitHub] [incubator-doris] yixiutt opened a new pull request, #9926: [feature](storage) rowset meta add tablet schema for future use

yixiutt opened a new pull request, #9926:
URL: https://github.com/apache/incubator-doris/pull/9926

   rowset persist tablet schema for future use, such as fast schema change
   or compatiable type upgrade. Init rowset meta while be start up so every
   rowset will have a tablet schema so we can handle it without too much
   code like:
   if (rowset_meta.has_schema()) {
       xxxx
   } else {
       xxxx
   }
   
   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   
   Describe the overview of changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   2. Has unit tests been added: (Yes/No/No Need)
   3. Has document been added or modified: (Yes/No/No Need)
   4. Does it need to update dependencies: (Yes/No)
   5. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   


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


[GitHub] [incubator-doris] dataroaring commented on a diff in pull request #9926: [feature](storage) rowset meta add tablet schema for future use

Posted by GitBox <gi...@apache.org>.
dataroaring commented on code in PR #9926:
URL: https://github.com/apache/incubator-doris/pull/9926#discussion_r887437219


##########
be/src/olap/rowset/rowset_meta.h:
##########
@@ -276,6 +277,22 @@ class RowsetMeta {
         return _rowset_meta_pb.alpha_rowset_extra_meta_pb();
     }
 
+    void set_tablet_schema(const TabletSchema* tablet_schema) {
+        TabletSchemaPB* ts_pb = _rowset_meta_pb.mutable_tablet_schema();
+        tablet_schema->to_schema_pb(ts_pb);
+        CHECK(_schema == nullptr);
+        _schema = std::make_shared<TabletSchema>(*tablet_schema);
+    }
+
+    void set_tablet_schema(const TabletSchema& tablet_schema) {
+        TabletSchemaPB* ts_pb = _rowset_meta_pb.mutable_tablet_schema();
+        tablet_schema.to_schema_pb(ts_pb);
+        CHECK(_schema == nullptr);
+        _schema = std::make_shared<TabletSchema>(tablet_schema);
+    }

Review Comment:
   Two set_tablet_schema methods here is duplicated? Does either one is enough?



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


[GitHub] [incubator-doris] yixiutt closed pull request #9926: [feature](storage) rowset meta add tablet schema for future use

Posted by GitBox <gi...@apache.org>.
yixiutt closed pull request #9926: [feature](storage) rowset meta add tablet schema for future use
URL: https://github.com/apache/incubator-doris/pull/9926


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


[GitHub] [incubator-doris] yixiutt commented on a diff in pull request #9926: [feature](storage) rowset meta add tablet schema for future use

Posted by GitBox <gi...@apache.org>.
yixiutt commented on code in PR #9926:
URL: https://github.com/apache/incubator-doris/pull/9926#discussion_r887601317


##########
be/src/olap/rowset/rowset_meta.h:
##########
@@ -276,6 +277,22 @@ class RowsetMeta {
         return _rowset_meta_pb.alpha_rowset_extra_meta_pb();
     }
 
+    void set_tablet_schema(const TabletSchema* tablet_schema) {
+        TabletSchemaPB* ts_pb = _rowset_meta_pb.mutable_tablet_schema();
+        tablet_schema->to_schema_pb(ts_pb);
+        CHECK(_schema == nullptr);
+        _schema = std::make_shared<TabletSchema>(*tablet_schema);
+    }
+
+    void set_tablet_schema(const TabletSchema& tablet_schema) {
+        TabletSchemaPB* ts_pb = _rowset_meta_pb.mutable_tablet_schema();
+        tablet_schema.to_schema_pb(ts_pb);
+        CHECK(_schema == nullptr);
+        _schema = std::make_shared<TabletSchema>(tablet_schema);
+    }

Review Comment:
   fixed



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