IcingaDB: Make Redis & DB values consistent#10452
Merged
julianbrost merged 8 commits intomasterfrom Jun 10, 2025
Merged
Conversation
julianbrost
reviewed
May 28, 2025
4ffd3e8 to
64fe23f
Compare
Member
Author
|
I think, I've addressed all the changes you requested, and the integration tests seems to be happy with this, so please have another look. |
julianbrost
reviewed
Jun 4, 2025
c747b9d to
8c4b592
Compare
julianbrost
reviewed
Jun 5, 2025
a41036d to
695ad3f
Compare
julianbrost
approved these changes
Jun 6, 2025
So that Icinga DB (Go) daemon doesn't have to make the mappings again.
…trs change Since the types and states attributes are user configurable and allowed to change at runtime, we need to update the actual filter bitsets whenever these attributes change. Otherwise, the filter bitsets would be stale and not reflect their current state.
695ad3f to
9e65a8b
Compare
nilmerg
added a commit
to Icinga/icingadb-web
that referenced
this pull request
Jun 12, 2025
resolves: #1197 - requires: Icinga/icinga2#10452
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.
This tries to make some of the values written to Redis and to the Database more consistent. Specifically, previously Icinga DB sent 0 or 1 for the
state_typefield, and the Icinga DB (Go) daemon mapped them tosoftandhardaccordingly before writing them to the database. This is not the case anymore, and Icinga DB (C++) now writessoftandharddirectly to Redis. This also applies to thecomment#entry_type,{user, notification}#types,statesandnotification#typefields. They all are now serialized exactly how they're going to be written to the database, thus eliminating the need for the Go daemon to do any mappings. Apart from that, theis_acknowledgedfield is now serialized astrueorfalseas opposed to1(normal) or2(sticky) previously. From now on that field will be set totrueif the checkable has been acknowledged, and the newis_sticky_acknowledgementfield will be set totrueif the acknowledgement is sticky.One additional bug that's been fixed by this PR but isn't related to the above topic is that the
{user, notification}#types,statesbitsets will correctly be refreshed whenever the user or notificationtypes,statesattributes are changed at runtime. Previously, the bitsets were only updated at startup, and never refreshed again (see 98dee18).Required By
is_sticky_acknowledgementicingadb-web#1202fixes #9427