Skip to content

Conversation

@hemantk-12
Copy link
Contributor

@hemantk-12 hemantk-12 commented Jan 31, 2023

What changes were proposed in this pull request?

Snapshot restore integration test fails when restoring form bucket1's snapshot to bucket2 for legacy bucket type.

This change is to delete keys from the source bucket. This is temporary fix to make sure that test passes all the time.
If we don't delete keys from the source bucket, copy command will fail. In copy command, there is a check to make sure that key doesn't exist in the destination bucket.
Problem is that RocksDB's seek operation doesn't 100% guarantee that item key is available. Tho we believe that it is. When we seek if there is a directory for the key name, sometime it returns non-null response but in reality item doesn't exist.
Here, sometimes seek returns null and sometimes it return source bucket (which is wrong). When is returns source bucket, we create fake dir and return the non-null response.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-7861

How was this patch tested?

Existing integration tests.

Copy link
Contributor

@smengcl smengcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 lgtm

@slfan1989
Copy link
Contributor

+1 LGTM.

@hemantk-12 hemantk-12 changed the title HDDS-7845. Appended the slash to copy to bucket path to fix the flaky snapshot restore tests. HDDS-7861. Appended the slash to copy to bucket path to fix the flaky snapshot restore tests. Feb 1, 2023
@hemantk-12 hemantk-12 changed the title HDDS-7861. Appended the slash to copy to bucket path to fix the flaky snapshot restore tests. HDDS-7861. Delete keys from the soruce bucket to fix the flakiness of snapshot restore tests. Feb 1, 2023
@hemantk-12 hemantk-12 changed the title HDDS-7861. Delete keys from the soruce bucket to fix the flakiness of snapshot restore tests. HDDS-7861. Delete keys from the source bucket to fix the flakiness of snapshot restore tests. Feb 1, 2023
Copy link
Contributor

@smengcl smengcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huge thanks to @hemantk-12 for digging into this.

Thanks @slfan1989 and @prashantpogde for the reviews.

@smengcl smengcl changed the title HDDS-7861. Delete keys from the source bucket to fix the flakiness of snapshot restore tests. HDDS-7861. [Snapshot] Delete keys from the source bucket to fix the flakiness of snapshot restore tests Feb 1, 2023
@smengcl smengcl merged commit afa6030 into apache:HDDS-6517-Snapshot Feb 1, 2023
@smengcl smengcl added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label Feb 12, 2023
@hemantk-12 hemantk-12 deleted the HDDS-7861 branch October 28, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

snapshot https://issues.apache.org/jira/browse/HDDS-6517

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants