Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

cancelation support for all index calls #514

Closed
Dieterbe opened this issue Feb 2, 2017 · 3 comments
Closed

cancelation support for all index calls #514

Dieterbe opened this issue Feb 2, 2017 · 3 comments

Comments

@Dieterbe
Copy link
Contributor

Dieterbe commented Feb 2, 2017

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/

@Dieterbe Dieterbe added the perf label Jun 28, 2017
@Dieterbe Dieterbe added this to the 0.10.0 milestone May 2, 2018
@Dieterbe Dieterbe modified the milestones: vnext, sprint-7 Jan 7, 2020
@fkaleo 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
@Dieterbe
Copy link
Contributor Author

This should probably wait until

@stale
Copy link

stale bot commented Aug 16, 2020

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.

@stale stale bot added the stale label Aug 16, 2020
@stale stale bot closed this as completed Aug 23, 2020
@robert-milan robert-milan reopened this Aug 31, 2020
@stale
Copy link

stale bot commented Nov 29, 2020

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.

@stale stale bot added the stale label Nov 29, 2020
@stale stale bot closed this as completed Dec 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants