Return Status::OK for unimplemented write batch handler in trace analyzer (#7910)

Summary:
The unimplemented handler will return Status::InvalidArgument() and caused issues when using trace analyzer for write batch record. Override with returning Status::OK()

Pull Request resolved: https://github.com/facebook/rocksdb/pull/7910

Test Plan: tested with real trace, make check

Reviewed By: siying

Differential Revision: D26154327

Pulled By: zhichao-cao

fbshipit-source-id: bcdefd4891f839b2e89e4c079f9f430245f482fb
main
Zhichao Cao 4 years ago committed by Facebook GitHub Bot
parent 21218316da
commit 108e6b6354
  1. 31
      tools/trace_analyzer_tool.h

@ -281,6 +281,37 @@ class TraceWriteHandler : public WriteBatch::Handler {
return ta_ptr->HandleMerge(column_family_id, key, value);
}
// The following hanlders are not implemented, return Status::OK() to avoid
// the running time assertion and other irrelevant falures.
virtual Status PutBlobIndexCF(uint32_t /*column_family_id*/,
const Slice& /*key*/,
const Slice& /*value*/) override {
return Status::OK();
}
// The default implementation of LogData does nothing.
virtual void LogData(const Slice& /*blob*/) override {}
virtual Status MarkBeginPrepare(bool = false) override {
return Status::OK();
}
virtual Status MarkEndPrepare(const Slice& /*xid*/) override {
return Status::OK();
}
virtual Status MarkNoop(bool /*empty_batch*/) override {
return Status::OK();
}
virtual Status MarkRollback(const Slice& /*xid*/) override {
return Status::OK();
}
virtual Status MarkCommit(const Slice& /*xid*/) override {
return Status::OK();
}
private:
TraceAnalyzer* ta_ptr;
};

Loading…
Cancel
Save