BUAAserein commented on code in PR #12603: URL: https://github.com/apache/iotdb/pull/12603#discussion_r1619963378
########## iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/RegionMaintainHandler.java: ########## @@ -223,15 +224,7 @@ public TSStatus createNewRegionPeer(TConsensusGroupId regionId, TDataNodeLocatio String storageGroup = configManager.getPartitionManager().getRegionStorageGroup(regionId); TCreatePeerReq req = new TCreatePeerReq(regionId, currentPeerNodes, storageGroup); - long ttl = Long.MAX_VALUE; - try { - ttl = configManager.getClusterSchemaManager().getDatabaseSchemaByName(storageGroup).getTTL(); - } catch (DatabaseNotExistsException e) { - LOGGER.warn( - "Cannot find out the database which region {} belongs to, ttl will be set to Long.MAX_VALUE", - regionId); - } - req.setTtl(ttl); + req.setTtl(getTTL(storageGroup)); Review Comment: This seems to be because the thrift definition in `TCreatePeerReq` is `ttl` and thrift function is automatically named `setTtl`. -- 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: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org