Add debug
GitOrigin-RevId: 63b9f09889866d9510ac951e8fc32be08615223b
This commit is contained in:
parent
69cf867d47
commit
251553b2e9
@ -80,6 +80,10 @@ struct BinlogEvent {
|
||||
Status init(BufferSlice &&raw_event, bool check_crc = true) TD_WARN_UNUSED_RESULT;
|
||||
|
||||
static BufferSlice create_raw(uint64 id, int32 type, int32 flags, const Storer &storer);
|
||||
std::string public_to_string() {
|
||||
return PSTRING() << "LogEvent[" << tag("id", format::as_hex(id_)) << tag("type", type_) << tag("flags", flags_)
|
||||
<< tag("data", data_.size()) << "]";
|
||||
}
|
||||
};
|
||||
|
||||
inline StringBuilder &operator<<(StringBuilder &sb, const BinlogEvent &event) {
|
||||
|
@ -18,7 +18,7 @@ void BinlogEventsProcessor::do_event(BinlogEvent &&event) {
|
||||
if ((event.flags_ & BinlogEvent::Flags::Rewrite) && !ids_.empty() && ids_.back() >= fixed_id) {
|
||||
auto it = std::lower_bound(ids_.begin(), ids_.end(), fixed_id);
|
||||
if (it == ids_.end() || *it != fixed_id) {
|
||||
LOG(FATAL) << "Ignore rewrite logevent";
|
||||
LOG(FATAL) << "Ignore rewrite logevent " << event.public_to_string();
|
||||
return;
|
||||
}
|
||||
auto pos = it - ids_.begin();
|
||||
|
Loading…
Reference in New Issue
Block a user