Skip to content

Commit 11ceab0

Browse files
committed
Fix neverReadyReplicas calculation for clone processes
1 parent 4587cfb commit 11ceab0

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

clustering/operations.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,15 +534,22 @@ func (p *managerProcess) configurePrimary(ctx context.Context, ss *StatusSet) (r
534534
continue
535535
}
536536
if ist == nil {
537+
// This happens during provisioning new pod
537538
neverReadyReplicas++
538539
continue
539540
}
540541

541542
rs := ist.ReplicaStatus
542543
if rs == nil {
544+
// This happens when new secondary is cloning, uncofrunately `ist.CloneStatus` does not seem to be realible for these checks...
545+
neverReadyReplicas++
543546
continue
544547
}
545-
if rs.ReplicaIORunning != "Yes" || rs.ReplicaSQLRunning != "Yes" {
548+
549+
// log.Info("DUMPING IST BECAUSE OTHER CHECKS DID NOT HIT!",
550+
// "ist", spew.Sdump(ist))
551+
552+
if !rs.IsRunning() {
546553
continue
547554
}
548555
if !rs.SecondsBehindSource.Valid || rs.SecondsBehindSource.Int64 >= 10 {

0 commit comments

Comments
 (0)