]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
OSDMap: reset osd_primary_affinity shared_ptr when deepish_copy_from 7553/head
authorXinze Chi <xinze@xsky.com>
Sun, 7 Feb 2016 10:50:29 +0000 (18:50 +0800)
committerXinze Chi <xinze@xsky.com>
Sun, 7 Feb 2016 14:19:35 +0000 (22:19 +0800)
commit990b437f4e616a87f4f7438e51945d531170ca83
tree1130df454704d3fe92d481e783d921303185db4c
parentd06da59b6e509277e77e099759ca70bd11f699da
OSDMap: reset osd_primary_affinity shared_ptr when deepish_copy_from

Base on current logic, OSDMonitor may call create_pending and
encode_pending twice for the some epoch.

In encode_pending:

tmp.deepish_copy_from(osdmap);
tmp.apply_incremental(pending_inc);

This Op would change the tmp osd_primary_affinity, but the osd_primary_affinity
is declared as ceph::shared_ptr, so this would change the osdmap too. When this
round encode_pending is proposed fail. We may call encode_pending again, but the
osdmap is changed last round, so the pending_inc would be wrong.

Fixes: #14686
Signed-off-by: Xinze Chi <xinze@xsky.com>
src/osd/OSDMap.h