-
Notifications
You must be signed in to change notification settings - Fork 66
[nexus] avoid loading torn sitreps #9627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hawkw
wants to merge
8
commits into
main
Choose a base branch
from
eliza/no-torn-sitreps
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
f548c33 to
5f9b831
Compare
smklein
reviewed
Jan 12, 2026
smklein
reviewed
Jan 12, 2026
Co-authored-by: Sean Klein <[email protected]>
smklein
approved these changes
Jan 12, 2026
Member
Author
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.
This commit fixes #9594 with regards to the sitrep load/delete operations.1
It makes the following changes:
fm_sitrep_readquery so that the sitrep metadata record is loaded last, and any loaded records are discarded should the metadata record no longer exist. This allows us to detect whether we have read a torn sitrep due to a concurrent delete (cda4f4d)fm_sitrep_delete_allquery to use a transaction. The query is still a batched delete of multiple sitrep IDs, but this should be fine as the query does notSELECTthe IDs to delete itself, and should therefore create a CRDB "write intent" only on the deleted rows. (1f0d6d9)fm_sitrep_delete_allquery, adding a guard against deleting the current sitrep and changing the log level to INFO to match the similar blueprint/inventory delete queries. This isn't strictly necessary to fix It's possible to load a torn blueprint / sitrep / inventory #9594, but seemed worthwhile to do while I was here (0251720)fm_sitrep_read_currentto correctly handle situations where it loads the current sitrep ID, and then, before it loads the sitrep records, a new sitrep is made current and the previous one is deleted (5f9b831)Footnotes
Which should be sufficient to close that issue, as Reorder blueprint read to the end of loading #9603 and Reorder inventory read to the end of loading #9604 already fixed the blueprint and inventory collection sides of the issue. ↩