twosigma / twosigma/beakerx

provide locking for the maven cache

Open
#6,497 3 comments 0 reactions 0 assignees View on GitHub
Bug Kernel Question
Dominant language
Jupyter Notebook
Stars
2.9k
Forks
383
PR merge metrics
No merged PRs in 30d

Description

in order to fix https://github.com/twosigma/beakerx/issues/6340
we need a lock among all the jvm kernels.
the obvious places to put the lock are in the jupyter server and in the file system (next to the cache itself).

A) this "dead man" file locking https://github.com/twosigma/beakerx/pull/6491
could fail but but maybe fine in practice. false negative is not so bad.

B) https://docs.oracle.com/javase/8/docs/api/java/nio/channels/FileLock.html
i have seen this kind of lock get stuck, which would be a bad bug.
or maybe something like it works reliably on all platforms?
seems unlikely. but probably can be made to work well on linux.
if this is robust then maybe the most correct solution.

C) The other option is in the jupyter server. we could add a rest endpoint with a normal server extension. Kernels could contact it to take and give up the lock. Could use rest or comm/zmq, idk if jupyter server can be extended to handle custom messages. This system has better correctness than A, and almost as good as B. plus it has the advantage that you can always restart jupyter and any locks evaporate.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.