-
Notifications
You must be signed in to change notification settings - Fork 279
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
Avoid infinite number of calls to listBlobs when doing prefix removals (e..g, gridset or layer removals) #1232
Conversation
@@ -154,7 +157,7 @@ public void testPutWithListener() throws MimeException, StorageException { | |||
eq(tile.getLayerName()), | |||
eq(tile.getGridSetId()), | |||
eq(tile.getBlobFormat()), | |||
anyString(), | |||
anyStringOrNull(), |
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.
These are changes in Mockito behavior, previous version was matching null too, the current one does not.
break; | ||
} | ||
// marker will be empty if there is no next page | ||
if (Strings.isNullOrEmpty(marker)) break; |
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 is the actual fix for the high number of listBlob. It would just not get out of this loop.
deletesToClear.add(prefix); | ||
} | ||
} | ||
if (!deletesToClear.isEmpty()) { |
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.
Scheduled deletes stored in property files would not get removed if the folder was empty.
…s (e..g, gridset or layer removals)
0036973
to
8c3a051
Compare
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.
Looks good to me
I believe this one happened because of a Jackson behavioral change. The code use to check for the "next page" marker in a paged listing to be null, but it's getting an empty string instead. The object representing the response is being deserialized using jackson.
While I was at it, I've fixed also a couple of other issues in tests, which might be also due to behavioral changes, this time in Azure itself (a "a//b" path is not treated as "a/b" but as "a/<emtpyNameFolder/b").