Otherwise, clear_data on MOSDOp will leave essentially
all of the buffers intact. This is a problem since the
OpTracker mechanism relies on being able to keep the mesage
around without keeping around the data.
Signed-off-by: Samuel Just <sam.just@inktank.com>
OSDOp::split_osd_op_vector_in_data(ops, data);
}
+ void clear_buffers() {
+ ops.clear();
+ }
const char *get_type_name() const { return "osd_op"; }
void print(ostream& out) const {
payload.clear();
middle.clear();
}
+
+ virtual void clear_buffers() {}
void clear_data() {
if (byte_throttler)
byte_throttler->put(data.length());
data.clear();
+ clear_buffers(); // let subclass drop buffers as well
}
bool empty_payload() { return payload.length() == 0; }