[RAC] [Rule Registry] Make data access via the RuleDataClient
version-aware
#112329
Labels
Team: Actionable Observability - DEPRECATED
For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge"
Theme: rac
label obsolete
v7.16.0
ℹ️ This capability in the
RuleDataClient
is only required if the old indices are kept at their respective version. If the indices are all updated in-place on upgrade, the writer can just continue to assume an up-to-date index mapping.📓 Summary
When updating alert documents in older indices (meaning indices whose mappings don't match the recent templates) the
RuleDataClient
must ensure that only appropriate fields are written. That means the documents will have to be "downgraded" to the mapping of their containing index.🖼️ Background
The initial plan to ensure backwards-compatibility of the alerts-as-data indices assumes only additive mapping changes are permitted. This allows for old indices to remain unchanged and new mappings being adopted via alias rollovers (see #108941). As a consequence the code that writes to the alerts-as-data indices needs to update documents in older indices in a way that works with the respective old mappings.
✔️ Implementation plan / acceptance criteria
RuleDataService
can be constructed with migration functions that match eventual changes to the technical mappings.RuleDataService.initializeIndex()
can contain migration functions that match eventual changes to the mappings in the registration-specific mappings.RuleDataClient
can be constructed with migration functions that consist of both the shared technical migrations as well as the registration-specific migrations.RuleDataClient
exposes and API that encapsulates alert document updates such thatsearch
calls to fetch documents to-be-updated is minimalbulk
calls💡 Implementation hints
IndexInfo
seems like a good way to pass the merged set of migration functions to theRuleDataClient
.RuleDataClient
could look something like this:The text was updated successfully, but these errors were encountered: