Repository navigation
fix(fusion): make alert delivery durable and enforce tenant dedup uniqueness - #1482
Open
Toufiqtoufiqbo wants to merge 1 commit into
Open
Toufiqtoufiqbo wants to merge 1 commit into
Toufiqtoufiqbo wants to merge 1 commit into
Conversation
…queness Signed-off-by: Toufiqtoufiqbo <toufiqtoufiqbo2009@gmail.com>
This branch has not been deployed
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.
Summary
Improve Fusion event-pipeline reliability by ensuring that processed events are not acknowledged before durable handling, making cache degradation fail-open, and enforcing tenant-scoped alert deduplication at the database level.
Changes
Kafka consumer durability
PostgreSQL alert persistence
120_alerts_tenant_dedup_unique.sqlwith a partial unique index on(tenant_id, dedup_hash).Cache and archival resilience
DLQ and operational safeguards
Validation
Reported local validation:
Limitations
120intentionally fails if existing duplicate(tenant_id, dedup_hash)pairs are found. Operators must resolve these deliberately before retrying the migration.AISOC_MIGRATIONS_STRICT=1where a migration failure must stop deployment.This PR addresses Fusion event durability and tenant-scoped alert deduplication. It does not claim to resolve every unrelated service-resilience finding in issue #1446.
Deployment notes
Review the migration and rollout ordering before deployment. Deploy the updated sink code before or together with the unique index to avoid spurious DLQ entries from older code encountering the new constraint.
For existing installations where write-locking impact is unacceptable, evaluate an out-of-band
CREATE UNIQUE INDEX CONCURRENTLYprocedure under the project's migration and operational conventions.Checklist