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

#1157: Fix for S3BlobStore bulk delete (without listeners) #1162

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

JeroenVu
Copy link
Contributor

(failing since a133c44, test ignored since 855ed09)

@@ -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);
Copy link
Member

Choose a reason for hiding this comment

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

The change looks legit, not sure why it was working with the listener thought?
Also, can you add a test to cover this issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Andrea, thanks for your review.

It was working with the listener because the coordsPrefix is not used there (see lines 349 and on).
if (listeners.isEmpty()) { <not working, because of coordsPrefix without ending slash> } else { <working, not using coordsPrefix> }

https://github.com/geowebcache/geowebcache/blob/a1a70d33facd19445e16abab6f12b35995b62d41/geowebcache/s3storage/src/main/java/org/geowebcache/s3/S3BlobStore.java#L349-L364

The test exists, but has been ignored by 855ed09.

public void testTruncateOptimizationIfNoListeners() throws StorageException, MimeException {

It effectively fails before the change above, and succeeds after the change.

Maybe you want to try to un-ignore this test?

Copy link
Member

Choose a reason for hiding this comment

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

You should un-ignore the test with this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants