[fm] Guard alert creation with SitrepGuardedInsert.#10533
Open
mergeconflict wants to merge 1 commit into
Open
Conversation
1bc2f60 to
62cc3dd
Compare
Wire the alert resource through `SitrepGuardedInsert`:
- `impl SitrepGuardedResource for Alert`;
- schema: `alert_generation` on `fm_sitrep` and the
`rendezvous_alert_created` marker table (migration
fm-alert-resource-deletion);
- `alert_create`'s FM path routes through the combinator, surfacing a
stale sitrep as a monomorphic `Error::Conflict`;
- `SitrepBuilder` tracks `alert_generation`, bumping it when the
outstanding alert-request set changes; the closed-case carry-forward
filter drops fully-satisfied closed cases;
- fm_rendezvous reads the expected generation and aborts the alert loop
on a stale mismatch; fm_analysis loads existing markers to drive
carry-forward; omdb displays the new status fields and generation.
6663e70 to
c6e5904
Compare
62cc3dd to
3d5af68
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.
Wire the alert resource through
SitrepGuardedInsert:impl SitrepGuardedResource for Alert;alert_generationonfm_sitrepand therendezvous_alert_createdmarker table (migration fm-alert-resource-deletion);alert_create's FM path routes through the combinator, surfacing a stale sitrep asError::Conflict;SitrepBuildertracksalert_generation, bumping it when the outstanding alert-request set changes; the closed-case carry-forward filter drops fully-satisfied closed cases and keeps those with unsatisfied alert requests;Context: #10248, builds on #10532. Note, garbage collection for
rendezvous_alert_createdrows is not in this PR, that should be coming later this week if all goes well.