zerolbsony commented on code in PR #17425:
URL: https://github.com/apache/iotdb/pull/17425#discussion_r3877709761
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java:
##########
@@ -485,6 +498,41 @@ public TSStatus setTimePartitionInterval(
}
}
+ public TSStatus setTimePartitionOrigin(SetTimePartitionOriginPlan
setTimePartitionOriginPlan) {
+ final TSStatus validationResult =
+ validateTimePartitionConfig(
+ new TDatabaseSchema(setTimePartitionOriginPlan.getDatabase())
+
.setTimePartitionOrigin(setTimePartitionOriginPlan.getTimePartitionOrigin()));
+ if (validationResult != null) {
+ return validationResult;
+ }
+ try {
+ return getConsensusManager().write(setTimePartitionOriginPlan);
Review Comment:
Resolved
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java:
##########
@@ -524,9 +553,15 @@ public SettableFuture<ConfigTaskResult> alterDatabase(
}
future.setException(new IoTDBException(tsStatus));
} else {
+ if (databaseSchema.isSetTimePartitionOrigin()
+ || databaseSchema.isSetTimePartitionInterval()
+ || databaseSchema.isSetNeedLastCache()) {
+ ClusterPartitionFetcher.getInstance().invalidAllCache();
Review Comment:
Resolved
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]