chaoyli commented on a change in pull request #3668:
URL: https://github.com/apache/incubator-doris/pull/3668#discussion_r430178225



##########
File path: be/src/olap/tablet_meta.cpp
##########
@@ -101,6 +89,8 @@ TabletMeta::TabletMeta(int64_t table_id, int64_t 
partition_id,
     tablet_meta_pb.set_cumulative_layer_point(-1);
     tablet_meta_pb.set_tablet_state(PB_RUNNING);
     *(tablet_meta_pb.mutable_tablet_uid()) = tablet_uid.to_proto();
+    tablet_meta_pb.set_tablet_type(tabletType == 
TTabletType::TABLET_TYPE_MEMORY ?

Review comment:
       Normal upgrade procedure is upgrading BE process proceeding of upgrading 
FE.
   When upgrading BE, tabletType may be not set.

##########
File path: be/src/olap/base_tablet.h
##########
@@ -84,6 +85,10 @@ inline const TabletMetaSharedPtr BaseTablet::tablet_meta() {
     return _tablet_meta;
 }
 
+inline bool BaseTablet::is_memory() const {
+    return _tablet_meta->tablet_type() == TabletTypePB::TABLET_TYPE_MEMORY;

Review comment:
       It may be not set default.

##########
File path: fe/src/main/java/org/apache/doris/alter/SchemaChangeJobV2.java
##########
@@ -240,7 +240,8 @@ protected void runPendingJob() throws AlterCancelException {
                                     Partition.PARTITION_INIT_VERSION, 
Partition.PARTITION_INIT_VERSION_HASH,
                                     tbl.getKeysType(), TStorageType.COLUMN, 
storageMedium,
                                     shadowSchema, bfColumns, bfFpp, 
countDownLatch, indexes,
-                                    tbl.isInMemory());
+                                    tbl.isInMemory(),
+                                    
tbl.getPartitionInfo().getTabletType(partitionId));
                             
createReplicaTask.setBaseTablet(partitionIndexTabletMap.get(partitionId, 
shadowIdxId).get(shadowTabletId), originSchemaHash);

Review comment:
       You should add constraint about ALTER TABLE.
   If I have a disk table.
   ```
   ALTER TABLE test SET("tablet_type"="memory");
   ```
   will be encounter error in BE processing.




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to