This repository has been archived by the owner on Aug 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 105
cancelation support for all index calls #514
Comments
fkaleo
changed the title
index list operations are not cancelled when index.json request is cancelled
cancelation support for all index calls
Jan 27, 2020
This should probably wait until |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
let's say you do a curl request for index.json this will take a long time.
When you control-c curl, it'll kill the connection/request, but the server will keep working on it, it won't cancel any routines working on the index operation, nor any pending RPC requests to peers. MemoryIdx.List will keep running (both on local peer and any remotes), holding a readlock on the index, iterating the index, and building a result set.
This problem is also in other places, such as our render request handling (which invokes findSeries and getTargets in a non-cancellable way), index find, index delete (this one holds a full lock), etc.
But I propose to just tackle one specific case first, we can do the others later.
This will probably involve https://golang.org/pkg/context/
The text was updated successfully, but these errors were encountered: