Skip to content

Commit 8b5c4c6

Browse files
add comments
Signed-off-by: OneSizeFitsQuorum <[email protected]>
1 parent 9f99286 commit 8b5c4c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/allocation/AbstractNodeAllocationStrategy.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ protected AbstractNodeAllocationStrategy() {
4949
new FolderManager(
5050
Arrays.asList(commonConfig.getWalDirs()), DirectoryStrategyType.SEQUENCE_STRATEGY);
5151
} catch (DiskSpaceInsufficientException e) {
52+
// folderManager remains null when disk space is insufficient during initialization
53+
// It will be lazily initialized later when disk space becomes available
5254
logger.error(
5355
"Fail to create wal node allocation strategy because all disks of wal folders are full.",
5456
e);
@@ -57,6 +59,9 @@ protected AbstractNodeAllocationStrategy() {
5759

5860
protected synchronized IWALNode createWALNode(String identifier) {
5961
try {
62+
// Lazy initialization of folderManager: if it was null during constructor
63+
// (due to insufficient disk space), try to initialize it now when disk space
64+
// might have become available
6065
if (folderManager == null) {
6166
folderManager =
6267
new FolderManager(

0 commit comments

Comments
 (0)