liyuheng55555 commented on code in PR #12603:
URL: https://github.com/apache/iotdb/pull/12603#discussion_r1616773742
##########
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:
setTtl VS getTTL ?
--
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]