From 40e5a358cfd8246c9f920570de07eb3ddcbead22 Mon Sep 17 00:00:00 2001 From: dt0 Date: Thu, 16 Sep 2021 20:15:10 +0800 Subject: [PATCH] add archive converge strategy --- src/archive/ob_archive_sender.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/archive/ob_archive_sender.cpp b/src/archive/ob_archive_sender.cpp index 962d44e150..2fec790493 100644 --- a/src/archive/ob_archive_sender.cpp +++ b/src/archive/ob_archive_sender.cpp @@ -458,6 +458,15 @@ int ObArchiveSender::do_statisfy_converge_strategy_(const ObPGKey& pg_key, const } else if (ObTimeUtility::current_time() - checkpoint_ts >= max_delay_time) { can_send = true; ARCHIVE_LOG(TRACE, "can send due to pg checkpoint ts delay reach limit", K(pg_key)); + } else if (log_id == 0) { + // For new pg created after archive starts, its checkpoint ts is faked while max archived log id is zero. + // Other modules depend on archive will be waited util max archived log id is bigger than zero, + // so this task should be archived immediately. + can_send = true; + ARCHIVE_LOG(TRACE, "can send due to max archived log id is zero", K(pg_key)); + } else if (!is_first_record_finish) { + can_send = true; + ARCHIVE_LOG(TRACE, "can send due to kickoff log not finish", K(pg_key)); } } -- GitLab