The GitHub Actions job "CI" on kvrocks.git has succeeded.
Run started by GitHub user enjoy-binbin (triggered by enjoy-binbin).

Head commit for run:
fd4b973cceb42e88d4f67fb79951d6d313718a43 / Binbin <binloveplay1...@qq.com>
Use MultiLockGuard to guarantee atomicity for multiple keys commands

In kvrocks, for multiple keys commands, we may break atomicity.
such as ZUNION, ZUNIONSTORE, ZINTERSTORE, SUNION, SUNIONSTORE,
SINTER, SINTERSTORE, SDIFF and SDIFFSTORE.

For SDIFFSTORE destination key1 [key2 ...] command, kvrocks will
read key1, key2 ... orderly without any lock, and then restore the
diff into destination key. So maybe some keys may be changed when
we read them orderly, that breaks atomicity but redis can guarantee
atomicity.

In this PR, we are using MultiLockGuard to lock these keys before
we read or write, so it is impossible to change these keys.

Fixes 1692.

Report URL: https://github.com/apache/kvrocks/actions/runs/5972542426

With regards,
GitHub Actions via GitBox

Reply via email to