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

Restore OPAQUE_MARKERS handling for list objects V1 #569

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

larshagencognite
Copy link
Contributor

We need this to support V1 clients that use the last object name in the response as a marker for the next page (which is allowed according to the S3 docs).

We need this to support V1 clients that use the last object
name in the response as a marker for the next page (which is
allowed according to the S3 docs).
@larshagencognite
Copy link
Contributor Author

@Decard6 This partially reverts changes in #531

@gaul
Copy link
Owner

gaul commented Oct 24, 2023

I'm concerned that s3-tests isn't exercising this behavior. Can you look at these and see what's missing?

@larshagencognite
Copy link
Contributor Author

Do we have automated testing against a real azure blob store?

@larshagencognite
Copy link
Contributor Author

@gaul Could you give me some pointers to where this should be tested?

@gaul
Copy link
Owner

gaul commented Oct 25, 2023

The ideal way to test this is https://github.com/ceph/s3-tests which I periodically rebase onto. But I don't have any automated integration tests against Azure presently.

Alternatively maybe we could parameterize some S3Proxy listObjects tests to toggle OPAQUE_MARKERS? I'm happy to merge this PR but just want to make sure that we have some way to avoid future regressions.

@gaul
Copy link
Owner

gaul commented Jan 12, 2024

@larshagencognite could you rebase this change?

@@ -1490,8 +1490,12 @@ private void handleBlobList(HttpServletRequest request,
if (Quirks.OPAQUE_MARKERS.contains(blobStoreType)) {
StorageMetadata sm = Streams.findLast(set.stream()).orElse(null);
if (sm != null) {
lastKeyToMarker.put(Maps.immutableEntry(containerName,
encodeBlob(encodingType, nextMarker)), nextMarker);
// TODO: verify if we need this handling at all for V2
Copy link
Owner

Choose a reason for hiding this comment

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

Can you verify this?

@gaul
Copy link
Owner

gaul commented Mar 10, 2024

@Decard6 any thoughts here?

lastKeyToMarker.put(Maps.immutableEntry(containerName,
encodeBlob(encodingType, nextMarker)), nextMarker);
// TODO: verify if we need this handling at all for V2
String lastKey = isListV2 ? encodeBlob(encodingType, nextMarker) : sm.getName();
Copy link
Contributor

Choose a reason for hiding this comment

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

@gaul
As long as isListV2 works as intended it should be good. Regardless I'd want to test the changes.

Copy link
Contributor

@Decard6 Decard6 Mar 15, 2024

Choose a reason for hiding this comment

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

All good. The change doesn't break pagination with V2.

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

Successfully merging this pull request may close these issues.

None yet

3 participants