Conversation
This was referenced Aug 31, 2026
HandSonic
force-pushed
the
fix/large-storage-atomic-mutations
branch
from
September 3, 2026 18:20
19a91a7 to
4d89722
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.
Related issue
N/A - no matching issue was found.
Summary
Limited
LargeDataStorageevicted and deleted an old record before proving the replacement detail could be persisted. Updates published mutable state before detail writes, while delete/index/detail failures were logged or left reload state inconsistent. This change stages detail/index mutations, publishes memory only after persistence, and rolls back single-step persistence failures. Delete rollback restores the index independently before attempting detail-file restoration, so a detail restore failure cannot hide the record from reload.Affected surfaces
Verification
LargeDataStorageTest15 passed, including failed detail/index writes, capacity eviction, update/delete rollback, and the detail-restore-failure regression.mvn -B -ntp -f chat2db-community-server/pom.xml -pl :chat2db-community-storage -am -Dmaven.test.skip=false -DskipTests=false '-Dsurefire.includes=**/*Test.java' -Dsurefire.failIfNoSpecifiedTests=false -Dmaven.test.failure.ignore=false package. Test JVM home/temp directories were isolated.Risk and compatibility
Reviewer map
LargeDataStorage.save,update,removeDataStrict, then fault-injection tests.4d89722ca462b1146f47fc005f283aa8e2198943anddce24b4e15c2c842268b0d12a4ec6b9c97987bcf; no migration is required.Contributor declaration
AI assistance: OpenAI Codex assisted with diagnosis, implementation, automated tests, verification, and adversarial review.