Skip to content

Commit

Permalink
method rename
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
  • Loading branch information
timvaillancourt committed Jun 4, 2024
1 parent 08df27a commit e2a2149
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions go/vt/vttablet/tabletmanager/rpc_replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -734,17 +734,17 @@ func (tm *TabletManager) isSetReplicationSourceLockedRunning() bool {
return tm._isSetReplicationSourceLockedRunning
}

// setIsSetReplicationSourceLockedRunning sets _isSetReplicationSourceLockedRunning under a lock.
// setReplicationSourceLockedRunning sets _isSetReplicationSourceLockedRunning under a lock.
// A mutex is needed because _isSetReplicationSourceLockedRunning is accessed concurrently.
func (tm *TabletManager) setIsSetReplicationSourceLockedRunning(running bool) {
func (tm *TabletManager) setReplicationSourceLockedRunning(running bool) {
tm.mutex.Lock()
defer tm.mutex.Unlock()
tm._isSetReplicationSourceLockedRunning = running
}

func (tm *TabletManager) setReplicationSourceLocked(ctx context.Context, parentAlias *topodatapb.TabletAlias, timeCreatedNS int64, waitPosition string, forceStartReplication bool, semiSync SemiSyncAction) (err error) {
tm.setIsSetReplicationSourceLockedRunning(true)
defer tm.setIsSetReplicationSourceLockedRunning(false)
tm.setReplicationSourceLockedRunning(true)
defer tm.setReplicationSourceLockedRunning(false)

// End orchestrator maintenance at the end of fixing replication.
// This is a best effort operation, so it should happen in a goroutine
Expand Down

0 comments on commit e2a2149

Please sign in to comment.