Skip to content

Commit

Permalink
PGPool::update: optimize with interval_set.swap
Browse files Browse the repository at this point in the history
ceph#17121 merged in ae64179

Use constant complexity swap instead of linear complexity
assignment.

Signed-off-by: Zac Medico <zmedico@gmail.com>
  • Loading branch information
zmedico committed Sep 12, 2017
1 parent 2ee413f commit 894f61c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/osd/PG.cc
Expand Up @@ -171,7 +171,7 @@ void PGPool::update(OSDMapRef map)
lgeneric_subdout(g_ceph_context, osd, 0) << __func__
<< " cached_removed_snaps shrank from " << cached_removed_snaps
<< " to " << newly_removed_snaps << dendl;
cached_removed_snaps = newly_removed_snaps;
cached_removed_snaps.swap(newly_removed_snaps);
newly_removed_snaps.clear();
}
snapc = pi->get_snap_context();
Expand Down

0 comments on commit 894f61c

Please sign in to comment.