]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: do not populate void pg_temp into nextmap 25780/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 4 Jan 2019 00:39:01 +0000 (08:39 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 4 Jan 2019 00:39:01 +0000 (08:39 +0800)
Due to commit ea723fb, pg_temp with clean acting set are added to inc map.
The original intent was to clear out pg_temps during priming, but as
written it would set a new_pg_temp item clearing the pg_temp even if one
didn't already exist.  Adding the up != acting condition in there makes us
only take that path if there is an existing pg_temp entry to remove.

Fixes: https://tracker.ceph.com/issues/37784
Signed-off-by: Aleksei Zakharov <zakharov.a.g@yandex.ru>
src/mon/OSDMonitor.cc

index 9f7f176aabe212148f0f12773fb681c5795b0e0c..ac943f1c983413be5765702442c5d5884375da0a 100644 (file)
@@ -979,7 +979,8 @@ void OSDMonitor::prime_pg_temp(
   int next_up_primary, next_acting_primary;
   next.pg_to_up_acting_osds(pgid, &next_up, &next_up_primary,
                            &next_acting, &next_acting_primary);
-  if (acting == next_acting && next_up != next_acting)
+  if (acting == next_acting &&
+      !(up != acting && next_up == next_acting))
     return;  // no change since last epoch
 
   if (acting.empty())