wire-server
wire-server copied to clipboard
[skip ci] PoC: trying out using cassandra for optimistic locking of prekeys
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.