do not sync pooler after being disabled
This commit is contained in:
parent
91c6f18bbb
commit
e2d08351aa
|
|
@ -710,7 +710,7 @@ func (c *Cluster) syncConnectionPooler(oldSpec, newSpec *acidv1.Postgresql, Look
|
||||||
// as per spec, hence do not skip syncing in that case, even though there
|
// as per spec, hence do not skip syncing in that case, even though there
|
||||||
// is no diff in specs
|
// is no diff in specs
|
||||||
if (!needSync && len(masterChanges) <= 0 && len(replicaChanges) <= 0) &&
|
if (!needSync && len(masterChanges) <= 0 && len(replicaChanges) <= 0) &&
|
||||||
((c.ConnectionPooler == nil && !needConnectionPooler(&newSpec.Spec)) ||
|
((!needConnectionPooler(&newSpec.Spec) && (c.ConnectionPooler == nil || !needConnectionPooler(&oldSpec.Spec))) ||
|
||||||
(c.ConnectionPooler != nil && needConnectionPooler(&newSpec.Spec) &&
|
(c.ConnectionPooler != nil && needConnectionPooler(&newSpec.Spec) &&
|
||||||
(c.ConnectionPooler[Master].LookupFunction || c.ConnectionPooler[Replica].LookupFunction))) {
|
(c.ConnectionPooler[Master].LookupFunction || c.ConnectionPooler[Replica].LookupFunction))) {
|
||||||
c.logger.Debugln("syncing pooler is not required")
|
c.logger.Debugln("syncing pooler is not required")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue