Skip to content

Conversation

@OneSizeFitsQuorum
Copy link
Contributor

@OneSizeFitsQuorum OneSizeFitsQuorum commented Dec 4, 2025

This PR addresses an NPE issue in WALNode creation that occurs when IoTDB starts with a full disk. When the disk is full at startup, the FolderManager initialization in the constructor fails, leaving it null. If disk space is later freed, subsequent WAL node creation attempts fail with NPE because the folderManager is still null.

img_v3_02sl_b85e7af0-2a08-4c97-b5d9-1f76ed4162dg

Signed-off-by: OneSizeFitsQuorum <tanxinyu@apache.org>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses an NPE issue in WALNode creation that occurs when IoTDB starts with a full disk. When the disk is full at startup, the FolderManager initialization in the constructor fails, leaving it null. If disk space is later freed, subsequent WAL node creation attempts fail with NPE because the folderManager is still null.

Key Changes:

  • Adds lazy initialization of FolderManager in the createWALNode method to handle recovery after disk space becomes available

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: OneSizeFitsQuorum <tanxinyu@apache.org>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 4, 2025

@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.87%. Comparing base (f4d628a) to head (cd69d06).

Files with missing lines Patch % Lines
...wal/allocation/AbstractNodeAllocationStrategy.java 80.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #16869      +/-   ##
============================================
- Coverage     38.87%   38.87%   -0.01%     
  Complexity      207      207              
============================================
  Files          5021     5021              
  Lines        333052   333058       +6     
  Branches      42389    42389              
============================================
- Hits         129487   129484       -3     
- Misses       203565   203574       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant