From f3729e4130366531bf16f99f2097ff57cac3ebea Mon Sep 17 00:00:00 2001 From: yyy-hust Date: Mon, 27 Nov 2023 13:42:00 +0000 Subject: [PATCH] [CP] [rebuild] fix rebuild fails because of last_submit_pid_ of newly created replica may be invalid --- src/logservice/palf/palf_handle_impl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/logservice/palf/palf_handle_impl.h b/src/logservice/palf/palf_handle_impl.h index cfcdef4b63..7370dabda1 100755 --- a/src/logservice/palf/palf_handle_impl.h +++ b/src/logservice/palf/palf_handle_impl.h @@ -236,10 +236,10 @@ public: } bool is_valid() const { - return (committed_end_lsn_.is_valid() - && last_submit_lsn_.is_valid() - && INVALID_PROPOSAL_ID != last_submit_log_pid_); + //last_submit_log_pid_ may be INVALID_PROPOSAL_ID when newly created replica has never synced any log + return (committed_end_lsn_.is_valid() && last_submit_lsn_.is_valid()); } + bool operator==(const RebuildMetaInfo &other) const { return (committed_end_lsn_ == other.committed_end_lsn_