Skip to content

Commit

Permalink
Tiny fix: Update a comment on gossip in InternalLeaderLease()
Browse files Browse the repository at this point in the history
The code was changed by #884 so that gossip is published even when the
replica is not a new lease holder.
  • Loading branch information
kkaneda committed Jun 27, 2015
1 parent ef0fc17 commit b3b2041
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions storage/range_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -764,10 +764,10 @@ func (r *Range) InternalLeaderLease(batch engine.Engine, ms *engine.MVCCStats, a
}
atomic.StorePointer(&r.lease, unsafe.Pointer(&args.Lease))

// If this replica is a new holder of the lease, gossip configs as
// necessary. Update the low water mark in the timestamp cache. We
// add the maximum clock offset to account for any difference in
// clocks between the expiration (set by a remote node) and this
// If this replica is a new holder of the lease, update the
// low water mark in the timestamp cache. We add the maximum
// clock offset to account for any difference in clocks
// between the expiration (set by a remote node) and this
// node.
if r.getLease().RaftNodeID == r.rm.RaftNodeID() && prevLease.RaftNodeID != r.getLease().RaftNodeID {
r.tsCache.SetLowWater(prevLease.Expiration.Add(int64(r.rm.Clock().MaxOffset()), 0))
Expand Down

0 comments on commit b3b2041

Please sign in to comment.