OneSizeFitsQuorum commented on code in PR #16869:
URL: https://github.com/apache/iotdb/pull/16869#discussion_r2616023170
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/allocation/AbstractNodeAllocationStrategy.java:
##########
@@ -49,14 +49,24 @@ protected AbstractNodeAllocationStrategy() {
new FolderManager(
Arrays.asList(commonConfig.getWalDirs()),
DirectoryStrategyType.SEQUENCE_STRATEGY);
} catch (DiskSpaceInsufficientException e) {
+ // folderManager remains null when disk space is insufficient during
initialization
+ // It will be lazily initialized later when disk space becomes available
logger.error(
"Fail to create wal node allocation strategy because all disks of
wal folders are full.",
e);
}
}
- protected IWALNode createWALNode(String identifier) {
+ protected synchronized IWALNode createWALNode(String identifier) {
Review Comment:
This overhead can be ignored as this function will be called very rarely
--
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]