Skip to content

Fix empty snapshot loading and region cleanup#17880

Merged
JackieTien97 merged 4 commits into
masterfrom
fixBug0609
Jun 9, 2026
Merged

Fix empty snapshot loading and region cleanup#17880
JackieTien97 merged 4 commits into
masterfrom
fixBug0609

Conversation

@shuwenwei

@shuwenwei shuwenwei commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

This PR fixes two independent region migration cleanup issues:

  • Allow snapshot loading to continue for empty regions whose snapshots do not contain seq or unseq data directories. The loader still reports a missing snapshot root as an error, but treats an existing snapshot with no data files as an empty region snapshot.
  • Skip TableDiskUsageIndex removal for tree-model regions, and complete remove operations immediately when no table disk usage writer exists.

Root Cause

There are two separate root causes:

  • Empty regions may not create seq/unseq data directories before migration, but the snapshot loader previously required at least one of those directories to exist.
  • Tree-model regions are never registered in TableDiskUsageIndex, but delete-region cleanup still attempted to remove their table disk usage index entry. Since no writer exists for those regions, the remove future could remain incomplete until timeout.

Allow loading snapshots that do not contain seq or unseq data directories so empty regions can be migrated successfully.

Skip table disk usage index removal for tree-model regions and complete remove operations when no writer exists to avoid delete-region timeouts.
@shuwenwei shuwenwei marked this pull request as ready for review June 9, 2026 08:06
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 24.13793% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.67%. Comparing base (3d98ea5) to head (4675517).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
...rageengine/dataregion/snapshot/SnapshotLoader.java 26.66% 11 Missing ⚠️
...utils/tableDiskUsageIndex/TableDiskUsageIndex.java 0.00% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17880      +/-   ##
============================================
- Coverage     40.85%   40.67%   -0.18%     
- Complexity     2611     2620       +9     
============================================
  Files          5201     5244      +43     
  Lines        354010   362374    +8364     
  Branches      45313    46653    +1340     
============================================
+ Hits         144626   147402    +2776     
- Misses       209384   214972    +5588     

☔ View full report in Codecov by Harness.
📢 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.

@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

@JackieTien97 JackieTien97 merged commit 07b9cb0 into master Jun 9, 2026
42 of 44 checks passed
@JackieTien97 JackieTien97 deleted the fixBug0609 branch June 9, 2026 11:37
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.

3 participants