FDB-735 reading overlay subtoc, do not check the current directory - #338
Open
danovaro wants to merge 3 commits into
Open
FDB-735 reading overlay subtoc, do not check the current directory #338danovaro wants to merge 3 commits into
danovaro wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Prevents moved overlay databases from recursively resolving missing overlay TOCs to their own directory.
Changes:
- Excludes overlay
tocfiles from moved-subtoc fallback. - Catches test exceptions by reference.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/fdb5/toc/TocHandler.cc |
Adjusts missing subtoc path resolution. |
tests/fdb/api/test_auxiliary.cc |
Avoids copying caught exceptions. |
Suppressed comments (1)
src/fdb5/toc/TocHandler.cc:692
- Returning an empty path makes both
preloadSubTocs()andreadNext()silently skip a mounted overlay whose original TOC is unavailable. The requirement is only to avoid resolving an overlay to the current database'stoc; preserve the missing absolute path instead so the normal open path reports the broken mount rather than returning incomplete results.
else {
absPath = "";
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+686
to
+688
| // the DB may have been moved, so try to find the subtoc in the current directory | ||
| // except in case of an overlay (subtoc name = "toc") | ||
| if (path.baseName() != "toc") { |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #338 +/- ##
===========================================
+ Coverage 77.51% 77.57% +0.06%
===========================================
Files 411 411
Lines 27553 27565 +12
Branches 2769 2769
===========================================
+ Hits 21358 21384 +26
+ Misses 6195 6181 -14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
danovaro
force-pushed
the
fix/FDB-735-wipe-overlay
branch
2 times, most recently
from
August 25, 2026 14:35
2166744 to
1c49d3a
Compare
danovaro
force-pushed
the
fix/FDB-735-wipe-overlay
branch
from
August 31, 2026 15:42
aba062f to
ec5e941
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
reading a subtoc of a moved DB, if the subtoc file is stored with an absolute path, it might appear as not existing.
in that scenario, we look for it in the current directory
in case of FDB overlays, we use the subtoc mechanism to record the referred FDB database
In this case, we should not look into the current directory (infinite loop)
Contributor Declaration
By opening this pull request, I affirm the following:
🌈🌦️📖🚧 Documentation FDB 🚧📖🌦️🌈
https://sites.ecmwf.int/docs/fdb/pull-requests/PR-338