Repository navigation
Refuse writes before the data volume fills, and report storage use - #12
Merged
Merged
Conversation
8 tasks done
…le core dumps with the JVM flag
pmbrull
approved these changes
Oct 30, 2026
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.
Stops a full data volume from taking Fuseki down, and reports how the TDB2 datasets use the volume so OpenMetadata can compact before it fills. Part of open-metadata/OpenMetadata#36437.
TDB2 never reuses disk by itself: every write transaction copies the index pages it touches, and the old pages stay until the dataset is compacted. TDB2 also memory-maps its files, so a write on a full volume does not fail cleanly: the JVM gets SIGBUS and exits, and exits again on every restart until someone frees space by hand. In production the crash also wrote heap-sized core dumps to the node's disk, which got the pod evicted.
Change
In the extension (only when
OPENMETADATA_EXTENSION_ENABLED=true):OPENMETADATA_STORAGE_MIN_FREE(default10%; a percentage, or a size such as20g), SPARQL updates and Graph Store uploads and deletes get HTTP 507 Insufficient Storage, the standard status for this (RFC 4918). The guard answers before anything reaches TDB2, so nothing is applied. Reads and compaction are never refused, so the volume can always be compacted back. An invalid reserve stops Fuseki at startup.GET /$/openmetadata/storage(admin only, like every path but/$/ping) returnstotalBytes,usableBytes,reserveBytesandlowOnSpace.In the entrypoint (always): the JVM starts with
-XX:-CreateCoredumpOnCrash, so a crash no longer writes a heap-sized core dump. Thehs_errreport is still written.The README gets both settings and a "Disk space" section. OpenMetadata's side (reading the report, compacting early, treating the 507 as a retry rather than a failed write) is PR #36472 in open-metadata/OpenMetadata, which also adds the same code to OpenMetadata's own
docker/rdf-storeimage.Verification
mvn verify), including new ones for the reserve parsing, the refusal and the report.docker build --check: no warnings.test/smoke-test.shon the built image passes, with a new "Disk space" section: with a reserve larger than the volume, updates (to/updateand to the dataset URL) get 507, uploads get 507, nothing refused is applied, and queries and compaction still work. It also covers the admin-only report, the core dump flag and an invalid reserve.