Skip to content

Commit

Permalink
Merge pull request #9525 from tschottdorf/ctx-todo
Browse files Browse the repository at this point in the history
storage: use context in AdminSplit
  • Loading branch information
tbg authored Sep 25, 2016
2 parents 82f55e5 + 9dc0167 commit bebc77a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage/replica_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -2310,7 +2310,7 @@ func (r *Replica) AdminSplit(

log.Infof(ctx, "initiating a split of this range at key %s", splitKey)

if err := r.store.DB().Txn(context.TODO(), func(txn *client.Txn) error {
if err := r.store.DB().Txn(ctx, func(txn *client.Txn) error {
log.Event(ctx, "split closure begins")
defer log.Event(ctx, "split closure ends")
// Update existing range descriptor for left hand side of
Expand Down Expand Up @@ -2790,7 +2790,7 @@ func (r *Replica) AdminMerge(
log.Infof(ctx, "initiating a merge of %s into this range", rightRng)
}

if err := r.store.DB().Txn(context.TODO(), func(txn *client.Txn) error {
if err := r.store.DB().Txn(ctx, func(txn *client.Txn) error {
log.Event(ctx, "merge closure begins")
// Update the range descriptor for the receiving range.
{
Expand Down

0 comments on commit bebc77a

Please sign in to comment.