Fix local get after publish and cache reliability#4095
Open
Bojan131 wants to merge 1 commit intov8/developfrom
Open
Fix local get after publish and cache reliability#4095Bojan131 wants to merge 1 commit intov8/developfrom
Bojan131 wants to merge 1 commit intov8/developfrom
Conversation
- Add pending storage cache fallback in get-command so gets work right after publish - Add merkle root index in pending-storage-service for fast operationId lookups - Clean up merkle root index entries on cache removal to prevent memory leak - Add retry logic in publish-finalization-command for reading cached assertion data - Reduce cache retry window from 100s to 25s (5 retries x 5s) for faster failure detection - Add getPublishOperationIdByUal repository method for cache lookups Made-with: Cursor
Closed
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.
What
Fixes the issue where
asset.get()would fail immediately after a publish because the data wasn't in the triple store yet but was still in the pending cache.Changes
Get command cache fallback (get-command.js)
Pending storage improvements (pending-storage-service.js)
Publish finalization retries (publish-finalization-command.js)
Repository (finality-status-repository.js)
Why
After a publish, the data lives in pending cache until blockchain finalization completes. If someone does a get during that window, it should still return the data. Previously it would just fail with a "falsy value" assertion error.
Made with Cursor