[CP] [rebuild] fix rebuild fails because of last_submit_pid_ of newly created replica may be invalid
This commit is contained in:
@ -236,10 +236,10 @@ public:
|
|||||||
}
|
}
|
||||||
bool is_valid() const
|
bool is_valid() const
|
||||||
{
|
{
|
||||||
return (committed_end_lsn_.is_valid()
|
//last_submit_log_pid_ may be INVALID_PROPOSAL_ID when newly created replica has never synced any log
|
||||||
&& last_submit_lsn_.is_valid()
|
return (committed_end_lsn_.is_valid() && last_submit_lsn_.is_valid());
|
||||||
&& INVALID_PROPOSAL_ID != last_submit_log_pid_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(const RebuildMetaInfo &other) const
|
bool operator==(const RebuildMetaInfo &other) const
|
||||||
{
|
{
|
||||||
return (committed_end_lsn_ == other.committed_end_lsn_
|
return (committed_end_lsn_ == other.committed_end_lsn_
|
||||||
|
|||||||
Reference in New Issue
Block a user