Skip to content

Commit

Permalink
Merge pull request #8676 from Icinga/bugfix/icingadb-delta-segv
Browse files Browse the repository at this point in the history
IcingaDB#UpdateAllConfigObjects(): don't modify map concurrently
  • Loading branch information
julianbrost authored Mar 9, 2021
2 parents a4cf811 + 31dacb8 commit 160d0ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/icingadb/icingadb-objects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ void IcingaDB::UpdateAllConfigObjects()
std::map<String, std::map<String, String>> ourContent;

for (auto& source : ourContentRaw) {
upqObjectType.Enqueue([&]() {
auto& dest (ourContent[source.first]);
auto& dest (ourContent[source.first]);

upqObjectType.Enqueue([&]() {
for (auto& hMSet : source.second) {
for (decltype(hMSet.size()) i = 0, stop = hMSet.size() - 1u; i < stop; i += 2u) {
dest.emplace(std::move(hMSet[i]), std::move(hMSet[i + 1u]));
Expand Down

0 comments on commit 160d0ea

Please sign in to comment.