From e2b6912d1cde480005123c0d6df633f72a8abbe2 Mon Sep 17 00:00:00 2001 From: Seebs Date: Fri, 12 Feb 2021 15:30:54 -0600 Subject: [PATCH] uninvert test for coordinator node / primary field translation node If we're the primary field translation node, we don't need to set up translation replication; we only need that if we're *not*. So it makes sense to test if !IsPrimaryFieldTranslationNode... except that the test is to determine whether to return early. So it should not be inverted. --- holder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/holder.go b/holder.go index 91d0e1211..c6c9977c7 100644 --- a/holder.go +++ b/holder.go @@ -1947,7 +1947,7 @@ func (s *holderSyncer) initializeIndexTranslateReplication(snap *topology.Cluste // initializeFieldTranslateReplication connects the coordinator to stream field data. func (s *holderSyncer) initializeFieldTranslateReplication(snap *topology.ClusterSnapshot) error { // Skip if coordinator. - if !snap.IsPrimaryFieldTranslationNode(s.Cluster.Node.ID) { + if snap.IsPrimaryFieldTranslationNode(s.Cluster.Node.ID) { return nil }