-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Enhance Shard Level Metdata check in BlobStoreTestUtil #75737
Enhance Shard Level Metdata check in BlobStoreTestUtil #75737
Conversation
Adding check that shard level index metadata actually contains the snapshots it's supposed to contain. This would have caught a number of recent bugs.
Pinging @elastic/es-distributed (Team:Distributed) |
@@ -3238,10 +3238,9 @@ public BlobStoreIndexShardSnapshot loadShardSnapshot(BlobContainer shardContaine | |||
* Loads all available snapshots in the repository using the given {@code generation} for a shard. When {@code shardGen} | |||
* is null it tries to load it using the BwC mode, listing the available index- blobs in the shard container. | |||
*/ | |||
public BlobStoreIndexShardSnapshots getBlobStoreIndexShardSnapshots(IndexId indexId, ShardId shardId, @Nullable String shardGen) | |||
public BlobStoreIndexShardSnapshots getBlobStoreIndexShardSnapshots(IndexId indexId, int shardId, @Nullable String shardGen) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API adjustment makes sense in isolation anyway IMO. It's misleading to assume that this logic would filter by ShardId
when in fact it merely filters by index id and shard number without reference to the original Index
in the ShardId
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks David! (and thanks Francisco :), timing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM2 👍
Adding check that shard level index metadata actually contains the snapshots it's supposed to contain. This would have caught a number of recent bugs.
Adding check that shard level index metadata actually contains the snapshots it's supposed to contain. This would have caught a number of recent bugs.
Adding check that shard level index metadata actually contains the snapshots
it's supposed to contain. This would have caught a number of recent bugs.