TiKV - implementing a work queue

Hi. This question is specifically about TiKV.

Is it possible to implement a workqueue-like behavior with TiKV?
Specifically, I would like to have this behavior:
If multiple transactions try to concurrently get the next item from the work queue, each transaction will obtain a distinct item from it.

I am thinking about a behavior similar to what I would obtain from a Redis ZSET with ZPOPMIN, or from SELECT FOR UPDATE and SKIP LOCKED in MySQL.

(I also sent this question on the TiDB and TiKV Slack channels, but I am posting here as well.)

1 Like

You can do PoC a test to use tidis GitHub - tidb-incubator/tidis: A distributed transactional large-scale NoSQL database powered by TiKV with LIST or ZSET data structure, but the performance may be limited because of the transaction conflicts on the same meta key in TiKV. For ZSET we have splitted the meta key to improve the conflicts.