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

[Backport 1.24.x] #1157: Fix for S3BlobStore bulk delete (without listeners) #1177

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public String parametersMetadataPrefix(final String layerName) {
* @return the key prefix up to the coordinates (i.e. {@code
* "<prefix>/<layer>/<gridset>/<format>/<parametersId>"})
*/
public String coordinatesPrefix(TileRange obj, boolean endWithSlah) {
public String coordinatesPrefix(TileRange obj, boolean endWithSlash) {
checkNotNull(obj.getLayerName());
checkNotNull(obj.getGridSetId());
checkNotNull(obj.getMimeType());
Expand All @@ -215,7 +215,7 @@ public String coordinatesPrefix(TileRange obj, boolean endWithSlah) {
}
String shortFormat = mimeType.getFileExtension(); // png, png8, png24, etc

String key = join(endWithSlah, prefix, layer, gridset, shortFormat, parametersId);
String key = join(endWithSlash, prefix, layer, gridset, shortFormat, parametersId);
return key;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public KeyVersion apply(long[] loc) {
@Override
public boolean delete(final TileRange tileRange) throws StorageException {

final String coordsPrefix = keyBuilder.coordinatesPrefix(tileRange, false);
final String coordsPrefix = keyBuilder.coordinatesPrefix(tileRange, true);
if (!s3Ops.prefixExists(coordsPrefix)) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ protected S3BlobStoreInfo getConfiguration() {
}

@Override
@Ignore // randomly fails
@Test
public void testTruncateOptimizationIfNoListeners() throws StorageException, MimeException {
super.testTruncateOptimizationIfNoListeners();
Expand Down
Loading