encode_json("key", key, f);
utime_t ut(timestamp);
encode_json("timestamp", ut, f);
+ encode_json("gen_id", gen_id, f);
}
void rgw_data_change::decode_json(JSONObj *obj) {
utime_t ut;
JSONDecoder::decode_json("timestamp", ut, obj);
timestamp = ut.to_real_time();
+ JSONDecoder::decode_json("gen_id", gen_id, obj);
}
void rgw_data_change_log_entry::dump(Formatter *f) const
DataLogEntityType entity_type;
std::string key;
ceph::real_time timestamp;
+ uint64_t gen_id;
void encode(ceph::buffer::list& bl) const {
- ENCODE_START(1, 1, bl);
+ ENCODE_START(2, 2, bl);
auto t = std::uint8_t(entity_type);
encode(t, bl);
encode(key, bl);
encode(timestamp, bl);
+ encode(gen_id, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::const_iterator& bl) {
- DECODE_START(1, bl);
+ DECODE_START(2, bl);
std::uint8_t t;
decode(t, bl);
entity_type = DataLogEntityType(t);
decode(key, bl);
decode(timestamp, bl);
+ if (struct_v < 2)
+ gen_id = 0;
+ else
+ decode(gen_id, bl);
DECODE_FINISH(bl);
}