[icinga-checkins] icinga.org: icinga2/master: DB IDO: Really do not clear downtimes on checkable upsert

git at icinga.org git at icinga.org
Thu Aug 11 18:32:25 CEST 2016


Module: icinga2
Branch: master
Commit: d84872f075614eac5c96ff87bd207a888e4062f4
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=d84872f075614eac5c96ff87bd207a888e4062f4

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Thu Aug 11 17:40:35 2016 +0200

DB IDO: Really do not clear downtimes on checkable upsert

refs #12258
refs #12288

---

 lib/db_ido/dbevents.cpp |   11 -----------
 1 file changed, 11 deletions(-)

diff --git a/lib/db_ido/dbevents.cpp b/lib/db_ido/dbevents.cpp
index 37b8a17..65eb6bd 100644
--- a/lib/db_ido/dbevents.cpp
+++ b/lib/db_ido/dbevents.cpp
@@ -441,19 +441,8 @@ void DbEvents::AddDowntimes(const Checkable::Ptr& checkable)
 {
 	std::set<Downtime::Ptr> downtimes = checkable->GetDowntimes();
 
-	/* Ensure to delete all downtimes and then insert any or none.
-	 * We must purge obsolete downtimes in the database at all cost. */
-
 	std::vector<DbQuery> queries;
 
-	DbQuery query1;
-	query1.Table = "scheduleddowntime";
-	query1.Type = DbQueryDelete;
-	query1.Category = DbCatDowntime;
-	query1.WhereCriteria = new Dictionary();
-	query1.WhereCriteria->Set("object_id", checkable);
-	queries.push_back(query1);
-
 	BOOST_FOREACH(const Downtime::Ptr& downtime, downtimes) {
 		AddDowntimeInternal(queries, downtime, false);
 	}



More information about the icinga-checkins mailing list