X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b185fc94a543b5b1361497c8502e876d6fdc2838..503c616f17ec4b77ce1778cc2033e6ed78927f0d:/services/keepstore/keepstore.go diff --git a/services/keepstore/keepstore.go b/services/keepstore/keepstore.go index f1e7aa9d14..75b6c4014d 100644 --- a/services/keepstore/keepstore.go +++ b/services/keepstore/keepstore.go @@ -4,7 +4,6 @@ import ( "bytes" "flag" "fmt" - "git.curoverse.com/arvados.git/services/keepstore/replicator" "io/ioutil" "log" "net" @@ -92,11 +91,16 @@ func (e *KeepError) Error() string { // Initialized by the --volumes flag (or by FindKeepVolumes). var KeepVM VolumeManager -// The KeepReplica is responsible for pulling blocks from other -// Keep servers to ensure replication. When Keep receives a new -// "pull list" from Data Manager, KeepReplica is responsible for -// fetching blocks on the list. -var replica *replicator.Replicator +// The pull list manager and trash queue are threadsafe queues which +// support atomic update operations. The PullHandler and TrashHandler +// store results from Data Manager /pull and /trash requests here. +// +// See the Keep and Data Manager design documents for more details: +// https://arvados.org/projects/arvados/wiki/Keep_Design_Doc +// https://arvados.org/projects/arvados/wiki/Data_Manager_Design_Doc +// +var pullq *WorkQueue +var trashq *WorkQueue // TODO(twp): continue moving as much code as possible out of main // so it can be effectively tested. Esp. handling and postprocessing @@ -258,9 +262,11 @@ func main() { // Start a round-robin VolumeManager with the volumes we have found. KeepVM = MakeRRVolumeManager(goodvols) - // Tell the built-in HTTP server to direct all requests to the REST - // router. - http.Handle("/", MakeRESTRouter()) + // Tell the built-in HTTP server to direct all requests to the REST router. + loggingRouter := MakeLoggingRESTRouter() + http.HandleFunc("/", func(resp http.ResponseWriter, req *http.Request) { + loggingRouter.ServeHTTP(resp, req) + }) // Set up a TCP listener. listener, err := net.Listen("tcp", listen)