Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/metamorphic: re-use single delete keys
Currently, the metamorphic tests randomly generate a set of operations to perform on the Pebble instance. Support for single deletes exists, though the keys that have been deleted are not considered for reuse. Track keys that have been singly deleted, and randomly reuse these keys when generating subsequent operations to perform. Prior to this patch, the generation operation log would resemble the following: ``` db.Set("foo", "bar") ... batch54.SingleDelete("foo") ... // No more operations on key "foo". ``` With this patch, the following seqeunce of operations is permissible: ``` db.Set("foo", "bar") ... db.SingleDelete("foo") ... db.Set("foo", "baz") ... db.Merge("foo", "bam") ... db.Set("foo", "boom") ... // Subsequent operations on key "foo" are permissible. ``` Related to cockroachdb/cockroach#69414.
- Loading branch information