Binlog: add an assert

GitOrigin-RevId: 84ac88b0e83917d16d0f7a7e35b9abd486698f3d
This commit is contained in:
Arseny Smirnov 2018-07-03 14:35:17 +03:00
parent 4621bdaff3
commit f51c0602e6

View File

@ -20,6 +20,8 @@ class BinlogEventsProcessor {
template <class CallbackT>
void for_each(CallbackT &&callback) {
for (size_t i = 0; i < ids_.size(); i++) {
CHECK(i == 0 || ids_[i - 1] < ids_[i]) << ids_[i - 1] << " " << events_[i - 1].public_to_string() << " "
<< ids_[i] << " " << events_[i].public_to_string();
if ((ids_[i] & 1) == 0) {
callback(events_[i]);
}