wire-server icon indicating copy to clipboard operation
wire-server copied to clipboard

[skip ci] PoC: trying out using cassandra for optimistic locking of prekeys

Open jschaul opened this issue 4 years ago • 0 comments

This passes the prekeys/race tests make integration-race:

Brig API Integration
  user
    client
      client/prekeys/race: [brig] W, request=N/A, Aye
[brig] W, request=N/A, NOOOOOOOOOOOOOOOOOOOOOOOOO we failed a claim! Another try...
[brig] W, request=N/A, Aye
[brig] W, request=N/A, NOOOOOOOOOOOOOOOOOOOOOOOOO we failed a claim! Another try...
[brig] W, request=N/A, Aye
[brig] W, request=N/A, Aye
[brig] W, request=N/A, Aye
[brig] W, request=N/A, Aye
[brig] W, request=N/A, Aye
[brig] W, request=N/A, Aye
[brig] W, request=N/A, Aye
[brig] W, request=N/A, Aye
OK (2.19s)

Perhaps the in-memory lock and this claim-based lock and randomness could all be combined? Since the claim-based lock creates as much latency as we decide the TTL to be and is thus expensive.

jschaul avatar Apr 15 '21 21:04 jschaul