Skip to content
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

[dev.icinga.com #8425] DB IDO: Duplicate entry icinga_scheduleddowntime #2613

Closed
icinga-migration opened this issue Feb 12, 2015 · 2 comments
Labels
area/db-ido Database output bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/8425

Created by mfriedrich on 2015-02-12 12:06:07 00:00

Assignee: mfriedrich
Status: Resolved (closed on 2015-02-12 12:25:05 00:00)
Target Version: 2.3.0
Last Update: 2015-02-12 12:25:05 00:00 (in Redmine)

Icinga Version: 2.2.4
Backport?: Not yet backported

There are two DbEvents::AddDowntime() events triggered asynchronously:

  • DbHostObject::OnConfigUpdate() calls AddDowntimes() which adds all scheduled and configured downtimes
  • OnDowntimeAdded signal gets triggered from checkable-downtime.cpp for each newly created downtime at runtime (which happens for the first downtime window for ScheduledDowntime config objects)

Since these events happen independant one from another, we cannot control whether one or the other should not insert such a downtime. And it's also not clear if an update would match on an insert before.

Therefore the solution is to delete the existing downtime before adding it again. This keeps the inserts intact, and ensures that there are not duplicate entries inside this status table.

This problem happens separately from #7765 where a config table with multiple config objects is involved.

Changesets

2015-02-12 12:19:27 00:00 by (unknown) 48fa1a1

DB IDO: Fix duplicate entries in scheduleddowntime table

fixes #8425

2015-02-12 13:22:24 00:00 by (unknown) 1c4501d

DB IDO: Require schema version 1.13.0

refs #8425

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-02-12 12:09:04 00:00

  • Relates set to 7765

@icinga-migration
Copy link
Author

Updated by Anonymous on 2015-02-12 12:25:05 00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 48fa1a1.

@icinga-migration icinga-migration added bug Something isn't working area/db-ido Database output labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.3.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/db-ido Database output bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant