Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/metamorphic: re-use single delete keys #1248

Closed
wants to merge 1 commit into from

Commits on Sep 2, 2021

  1. metamorphic: reuse 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.
    nicktrav committed Sep 2, 2021
    Configuration menu
    Copy the full SHA
    9ffc082 View commit details
    Browse the repository at this point in the history