Unsafe to run shard copy concurrently with various functions and commands
Open
1-2 days
bug
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
We have a number of code paths that use placement metadata in an unsafe way, namely without first obtaining a shard metadata lock, meaning they are allowed to run concurrently with a shard repair/copy/move and might use stale metadata. Even if we do obtain a lock, we also need to make sure that changes in shard metadata made by repair/copy/move are visible once the lock is obtained, which may require a new snapshot. Not doing so may result in incorrect results, inconsistent replication, or data loss, when these code paths are exercised concurrently with a shard placement change.
Contributor guide
Assessment
This issue has not been assessed yet.