Browse Source

etcdserver: note that apply may need Context

Blake Mizerany 11 years ago
parent
commit
d2b99aa7c9
1 changed files with 2 additions and 0 deletions
  1. 2 0
      etcdserver2/server.go

+ 2 - 0
etcdserver2/server.go

@@ -109,6 +109,8 @@ func (s *Server) Do(ctx context.Context, r Request) (Response, error) {
 
 // apply interprets r as a call to store.X and returns an Response interpreted from store.Event
 func (s *Server) apply(e raft.Entry) (*store.Event, error) {
+	// TODO(bmizerany): apply needs to take a context.Context, but store
+	// doesn't have a mechanism to abort operations yet.
 	var r Request
 	if err := r.Unmarshal(e.Data); err != nil {
 		return nil, err