提交 d41fa1f0 编写于 作者: H Handora 提交者: ob-robot

[CP] [BUG] ignore max majority log ts update for reconfirm

上级 ab87ce24
......@@ -3153,7 +3153,13 @@ int ObLogSlidingWindow::majority_cb(
ret = OB_ERR_NULL_VALUE;
} else {
log_task = static_cast<ObLogTask *>(log_data);
if (ObLogType::OB_LOG_START_MEMBERSHIP != log_task->get_log_type()) {
if (ObLogType::OB_LOG_START_MEMBERSHIP != log_task->get_log_type()
// Towards to the log which reconfirmed by the new leader, it may call
// majority_cb without really replaying it which means the real log
// position may lag behind the max majority log too much and cause the
// freeze process to hang(which will check the freeze log ts is ahead
// the max majority log ts).
&& !log_task->is_empty_cb()) {
try_update_max_majority_log(log_id, log_task->get_submit_timestamp());
}
if (OB_FAIL(log_task->submit_log_succ_cb(partition_key_, log_id, batch_committed, batch_first_participant))) {
......
......@@ -269,6 +269,11 @@ int ObLogTask::set_log_cursor_without_stat(const ObLogCursor& cursor)
return ret;
}
bool ObLogTask::is_empty_cb() const
{
return NULL == submit_cb_;
}
int ObLogTask::submit_log_succ_cb(const common::ObPartitionKey& pkey, const uint64_t log_id, const bool batch_committed,
const bool batch_first_participant)
{
......
......@@ -153,6 +153,7 @@ public:
const ObLogCursor& get_log_cursor() const;
bool is_log_cursor_valid() const;
bool is_checksum_verified(const int64_t data_checksum) const;
bool is_empty_cb() const;
// common::ObTraceProfile *get_trace_profile() {return trace_profile_;}
// int report_trace();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册