Skip to content

Commit

Permalink
some comment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gregns1 committed Apr 6, 2023
1 parent 4c7977c commit c793086
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions db/sg_replicate_cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -1191,8 +1191,10 @@ func (c *SGRCluster) GetReplicationIDsForNode(nodeUUID string) (replicationIDs [
return replicationIDs
}

func (m *sgReplicateManager) GetActiveReplicators() map[string]*ActiveReplicator {
return m.activeReplicators
func (m *sgReplicateManager) GetNumberActiveReplicators() int {
m.activeReplicatorsLock.Lock()
defer m.activeReplicatorsLock.Unlock()
return len(m.activeReplicators)
}

// RebalanceReplications distributes the set of defined replications across the set of available nodes
Expand Down
4 changes: 2 additions & 2 deletions rest/utilities_testing_resttester.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ func (rt *RestTester) WaitForCheckpointLastSequence(expectedName string) (string

func (rt *RestTester) WaitForActiveReplicatorInitialization(count int) {
successFunc := func() bool {
ar := rt.GetDatabase().SGReplicateMgr.GetActiveReplicators()
return len(ar) == count
ar := rt.GetDatabase().SGReplicateMgr.GetNumberActiveReplicators()
return ar == count
}
require.NoError(rt.TB, rt.WaitForCondition(successFunc), "mismatch on number of active replicators")
}
Expand Down

0 comments on commit c793086

Please sign in to comment.