Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(storage-manager): incorrectly revive key after deletion (#1689)
This commit fixes a bug where a key would be incorrectly "revived" in a scenario where a deletion is followed by a Wildcard Put. Assuming we have two Replicas, R1 and R2, the problematic scenario was: 0. Replicas R1 and R2 are disconnected. 1. `z_put "a" = 1 @t1` on Replica R1. 2. `z_delete "a" @t2` on Replica R2. 3. `z_put "**" = 42 @t3` on Replica R2. 4. Connect Replicas R1 and R2. After aligning, before this fix, Replicas R1 and R2 would have `"a" = 42 @t3` in their storage whereas there should have been no key associated to `"a"` because of the delete at `@t2`. This commit fixes this bug. * plugins/zenoh-plugin-storage-manager/src/replication/core/aligner_reply.rs: instead of eagerly applying a Wildcard Update that should not be applied, do nothing. The comments were updated to provide more context. Signed-off-by: Julien Loudet <[email protected]>
- Loading branch information