class MOSDPGPush : public MOSDFastDispatchOp {
static const int HEAD_VERSION = 2;
- static const int COMPAT_VERSION = 1;
-
+ static const int COMPAT_VERSION = 2;
public:
pg_shard_t from;
::decode(map_epoch, p);
::decode(pushes, p);
::decode(cost, p);
- if (header.version >= 2) {
- ::decode(pgid.shard, p);
- ::decode(from, p);
- } else {
- pgid.shard = shard_id_t::NO_SHARD;
- from = pg_shard_t(get_source().num(), shard_id_t::NO_SHARD);
- }
+ ::decode(pgid.shard, p);
+ ::decode(from, p);
}
void encode_payload(uint64_t features) override {
class MOSDPGPushReply : public MOSDFastDispatchOp {
static const int HEAD_VERSION = 2;
- static const int COMPAT_VERSION = 1;
+ static const int COMPAT_VERSION = 2;
public:
pg_shard_t from;
::decode(map_epoch, p);
::decode(replies, p);
::decode(cost, p);
-
- if (header.version >= 2) {
- ::decode(pgid.shard, p);
- ::decode(from, p);
- } else {
- pgid.shard = shard_id_t::NO_SHARD;
- from = pg_shard_t(get_source().num(), shard_id_t::NO_SHARD);
- }
+ ::decode(pgid.shard, p);
+ ::decode(from, p);
}
void encode_payload(uint64_t features) override {