fdb-adopt to re-index an existing grib file - #305
Open
danovaro wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #305 +/- ##
===========================================
- Coverage 77.36% 77.36% -0.01%
===========================================
Files 410 411 +1
Lines 27483 27525 +42
Branches 2758 2763 +5
===========================================
+ Hits 21263 21295 +32
- Misses 6220 6230 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new fdb-adopt CLI tool to (re)index fields from an existing GRIB file into an FDB catalogue, and wires it into the tools build. Also includes a small refactor in Archiver::flush().
Changes:
- Added
src/fdb5/tools/fdb-adopt.ccto scan GRIB files, decode keys, and createreindex()entries pointing at file offsets. - Registered the new tool in
src/fdb5/CMakeLists.txtso it is built/installed with other FDB tools. - Refactored
Archiver::flush()loop to a range-based form.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/fdb5/tools/fdb-adopt.cc |
New CLI tool that scans GRIB input and writes reindex entries using TocFieldLocation offsets |
src/fdb5/database/Archiver.cc |
Minor loop refactor in flush() |
src/fdb5/CMakeLists.txt |
Adds fdb-adopt to the fdb5_tools executable list |
| eckit::Length length = msg.length(); | ||
| eckit::Offset offset = reader.position() - length; | ||
|
|
||
| fdb.reindex(key, fdb5::TocFieldLocation{uri, offset, length, fdb5::Key()}); |
danovaro
force-pushed
the
feature/adopt
branch
2 times, most recently
from
August 11, 2026 21:50
8b3d4f6 to
36e307d
Compare
danovaro
force-pushed
the
feature/adopt
branch
from
August 17, 2026 12:16
36e307d to
bb47595
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
Contributor Declaration
By opening this pull request, I affirm the following:
🌈🌦️📖🚧 Documentation FDB 🚧📖🌦️🌈
https://sites.ecmwf.int/docs/fdb/pull-requests/PR-305