diff --git a/server/etcdserver/apply/apply.go b/server/etcdserver/apply/apply.go index abf827fb261b..432116c721bd 100644 --- a/server/etcdserver/apply/apply.go +++ b/server/etcdserver/apply/apply.go @@ -68,7 +68,7 @@ type applyFunc func(ctx context.Context, r *pb.InternalRaftRequest) *Result type applierV3 interface { // Apply executes the generic portion of application logic for the current applier, but // delegates the actual execution to the applyFunc method. - Apply(ctx context.Context, r *pb.InternalRaftRequest, applyFunc applyFunc) *Result + Apply(r *pb.InternalRaftRequest, applyFunc applyFunc) *Result Put(ctx context.Context, p *pb.PutRequest) (*pb.PutResponse, *traceutil.Trace, error) Range(ctx context.Context, r *pb.RangeRequest) (*pb.RangeResponse, *traceutil.Trace, error) @@ -146,8 +146,8 @@ func newApplierV3Backend( txnModeWriteWithSharedBuffer: txnModeWriteWithSharedBuffer} } -func (a *applierV3backend) Apply(ctx context.Context, r *pb.InternalRaftRequest, applyFunc applyFunc) *Result { - return applyFunc(ctx, r) +func (a *applierV3backend) Apply(r *pb.InternalRaftRequest, applyFunc applyFunc) *Result { + return applyFunc(context.TODO(), r) } func (a *applierV3backend) Put(ctx context.Context, p *pb.PutRequest) (resp *pb.PutResponse, trace *traceutil.Trace, err error) { diff --git a/server/etcdserver/apply/apply_auth.go b/server/etcdserver/apply/apply_auth.go index d650c02709e4..974ec283141f 100644 --- a/server/etcdserver/apply/apply_auth.go +++ b/server/etcdserver/apply/apply_auth.go @@ -41,7 +41,7 @@ func newAuthApplierV3(as auth.AuthStore, base applierV3, lessor lease.Lessor) *a return &authApplierV3{applierV3: base, as: as, lessor: lessor} } -func (aa *authApplierV3) Apply(ctx context.Context, r *pb.InternalRaftRequest, applyFunc applyFunc) *Result { +func (aa *authApplierV3) Apply(r *pb.InternalRaftRequest, applyFunc applyFunc) *Result { aa.mu.Lock() defer aa.mu.Unlock() if r.Header != nil { @@ -57,7 +57,7 @@ func (aa *authApplierV3) Apply(ctx context.Context, r *pb.InternalRaftRequest, a return &Result{Err: err} } } - ret := aa.applierV3.Apply(ctx, r, applyFunc) + ret := aa.applierV3.Apply(r, applyFunc) aa.authInfo.Username = "" aa.authInfo.Revision = 0 return ret diff --git a/server/etcdserver/apply/uber_applier.go b/server/etcdserver/apply/uber_applier.go index 82b7a6276698..d8e9503669ad 100644 --- a/server/etcdserver/apply/uber_applier.go +++ b/server/etcdserver/apply/uber_applier.go @@ -115,7 +115,7 @@ func (a *uberApplier) Apply(r *pb.InternalRaftRequest) *Result { // then dispatch() unpacks the request to a specific method (like Put), // that gets executed down the hierarchy again: // i.e. CorruptApplier.Put(CappedApplier.Put(...(BackendApplier.Put(...)))). - return a.applyV3.Apply(context.TODO(), r, a.dispatch) + return a.applyV3.Apply(r, a.dispatch) } // dispatch translates the request (r) into appropriate call (like Put) on