Skip to content

Commit

Permalink
Merge branch 'sync_mode_reloaded_part_2' into sync_mode_reloaded_part_3
Browse files Browse the repository at this point in the history
  • Loading branch information
eberlep committed Jul 24, 2024
2 parents d9920c1 + 827fe9f commit 715a61c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions controllers/postgres_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ func (r *PostgresReconciler) checkAndUpdatePatroniReplicationConfig(log logr.Log

if instance.IsReplicationPrimary() {
if resp.StandbyCluster != nil {
log.V(debugLogLevel).Info("standby_cluster mistmatch, requeing", "response", resp)
log.V(debugLogLevel).Info("standby_cluster mismatch, requeing", "response", resp)
return requeueAfterReconcile, nil
}
if instance.Spec.PostgresConnection.SynchronousReplication {
Expand All @@ -1076,12 +1076,12 @@ func (r *PostgresReconciler) checkAndUpdatePatroniReplicationConfig(log logr.Log
synchronousStandbyApplicationName = pointer.String(s.ToPeripheralResourceName())
}
if resp.SynchronousNodesAdditional == nil || *resp.SynchronousNodesAdditional != *synchronousStandbyApplicationName {
log.V(debugLogLevel).Info("synchronous_nodes_additional mistmatch, updating and requeing", "response", resp)
log.V(debugLogLevel).Info("synchronous_nodes_additional mismatch, updating and requeing", "response", resp)
return requeueAfterReconcile, r.httpPatchPatroni(log, ctx, instance, leaderIP, synchronousStandbyApplicationName)
}
} else {
if resp.SynchronousNodesAdditional != nil {
log.V(debugLogLevel).Info("synchronous_nodes_additional mistmatch, updating and requeing", "response", resp)
log.V(debugLogLevel).Info("synchronous_nodes_additional mismatch, updating and requeing", "response", resp)
return requeueAfterReconcile, r.httpPatchPatroni(log, ctx, instance, leaderIP, nil)
}
}
Expand All @@ -1108,7 +1108,7 @@ func (r *PostgresReconciler) checkAndUpdatePatroniReplicationConfig(log logr.Log
return requeueAfterReconcile, r.httpPatchPatroni(log, ctx, instance, leaderIP, nil)
}
if resp.SynchronousNodesAdditional != nil {
log.V(debugLogLevel).Info("synchronous_nodes_additional mistmatch, updating and requeing", "response", resp)
log.V(debugLogLevel).Info("synchronous_nodes_additional mismatch, updating and requeing", "response", resp)
return requeueAfterReconcile, r.httpPatchPatroni(log, ctx, instance, leaderIP, nil)
}
}
Expand Down

0 comments on commit 715a61c

Please sign in to comment.