-
Notifications
You must be signed in to change notification settings - Fork 589
IcingaDB: Make Redis & DB values consistent #10452
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
Merged
Merged
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
julianbrost
reviewed
May 28, 2025
4ffd3e8
to
64fe23f
Compare
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
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_type
field, and the Icinga DB (Go) daemon mapped them tosoft
andhard
accordingly before writing them to the database. This is not the case anymore, and Icinga DB (C++) now writessoft
andhard
directly to Redis. This also applies to thecomment#entry_type
,{user, notification}#types,states
andnotification#type
fields. 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_acknowledged
field is now serialized astrue
orfalse
as opposed to1
(normal) or2
(sticky) previously. From now on that field will be set totrue
if the checkable has been acknowledged, and the newis_sticky_acknowledgement
field will be set totrue
if 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,states
bitsets will correctly be refreshed whenever the user or notificationtypes,states
attributes are changed at runtime. Previously, the bitsets were only updated at startup, and never refreshed again (see 98dee18).Required By
is_sticky_acknowledgement
icingadb-web#1202fixes #9427