dotmesh-io / dotmesh

dotmesh (dm) is like git for your data volumes (databases, files etc) in Docker and Kubernetes
https://dotmesh.com
Apache License 2.0
539 stars 29 forks source link

Cancel requests immediately when doing long-running transfers #684

Closed lukemarsden closed 5 years ago

lukemarsden commented 5 years ago

User story

As a Dotscientist, I'd like to get an immediate error message when trying to launch Jupyter if one of the state machine involved is too busy to service my request, rather than seeing an infinite series of inscrutable intercluster transfer not found errors.

Implementation

Rather than letting requests pile up while a transfer is in progress, empty out f.innerRequests by refusing all requests with a "busy" message. Better to fail quickly than hang for hours, especially when things like RPCs will tend to timeout.