提交 110e9be4 编写于 作者: G gruminions 提交者: Zhongjun Ni

framework: add judgement of time interval to return early

上级 0bf299b4
......@@ -74,6 +74,11 @@ bool RecordReader::ReadMessage(RecordMessage* message, uint64_t begin_time,
if (!is_valid_) {
return false;
}
if (begin_time > header_.end_time() || end_time < header_.begin_time()) {
return false;
}
while (message_index_ < chunk_.messages_size()) {
const auto& next_message = chunk_.messages(message_index_);
uint64_t time = next_message.time();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册