When the osdmap_gate got a new map, it's supposed to release blocked ops on
all previous maps section of which is represented by [waiting_peering.begin(),
waiting_peering.upper_bound(epoch)]. So it's essentail that waiting_peering is
ordered in ascending order of the map epoch
Signed-off-by: Xuehan Xu <xxhdx1985126@163.com>
}
};
- // order the promises in descending order of the waited osdmap epoch,
+ // order the promises in ascending order of the waited osdmap epoch,
// so we can access all the waiters expecting a map whose epoch is less
- // than a given epoch
+ // than or equal to a given epoch
using waiting_peering_t = std::map<epoch_t,
- OSDMapBlocker,
- std::greater<epoch_t>>;
+ OSDMapBlocker>;
const char *blocker_type;
waiting_peering_t waiting_peering;
epoch_t current = 0;