apple / apple/foundationdb

Optional watch timeout

Open
#9,123 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

Hi folks!

I'm working on implementing client side record locking and to implement liveliness checking I'm using a fdb watch to monitor locks for state changes. To handle the case of stale locks due to dead lock owners it would be nice to have a timeout parameter for the watch API "wait until ready" functions. Supposedly the underlying primitives do support a timeout parameter so it should be a question of exposing those through the fdb API. I'm using the Python bindings which seem to use threading.Event.wait() and multiprocessing.Semaphore.acquire().

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start with the Python binding implementations of the watch API's "wait until ready" functions, especially their use of threading.Event.wait() and multiprocessing.Semaphore.acquire(). Check how the underlying primitives accept timeouts, then determine how an optional timeout should be exposed through the FoundationDB API; done means callers can use it to detect stale locks without changing existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.