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

Unnecessary NextMarker in Get Bucket's response if CommonPrefixes contain the last key. [JIRA: RCS-155] #1099

Closed
Tracked by #1103
ksauzz opened this issue Mar 19, 2015 · 2 comments
Assignees
Milestone

Comments

@ksauzz
Copy link
Contributor

ksauzz commented Mar 19, 2015

This is mostly harmless API incompatible issue.

In 'Get Bucket' request using delimiter, Riak CS should not respond unnecessary NextMarker if common prefixes contains the last key.

This bug is found by one of ceph_tests. After the fix, this test can be enabled.

reproduction

make following 5 objects:

% s3cmd -c user.cfg ls -r s3://test/
2015-03-19 09:06         0   s3://test/asdf
2015-03-19 09:06         0   s3://test/boo/bar
2015-03-19 09:07         0   s3://test/boo/baz/xyzzy
2015-03-19 09:07         0   s3://test/cquux/bla
2015-03-19 09:07         0   s3://test/cquux/thud

get 2nd page with max-keys=1 as a following:

on Riak CS

% s3curl.pl --id user -- -x localhost:8080 "http://test.s3.amazonaws.com/?delimiter=/&marker=boo/&max-keys=1" -s | tidy -xml -indent -q
<?xml version="1.0" encoding="utf-8"?>
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Name>test</Name>
  <Prefix></Prefix>
  <Marker>boo/</Marker>
  <NextMarker>cquux/</NextMarker>            <---------- unnecessary
  <MaxKeys>1</MaxKeys>
  <Delimiter>/</Delimiter>
  <IsTruncated>false</IsTruncated>
  <CommonPrefixes>
    <Prefix>cquux/</Prefix>
  </CommonPrefixes>
</ListBucketResult>

on AWS

% s3curl.pl --id aws -- "http://xxxxxxxxxx.s3.amazonaws.com/?delimiter=/&marker=boo/&max-keys=1" -s | tidy -xml -indent -q
<?xml version="1.0" encoding="utf-8"?>
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Name>xxxxxxxxxx</Name>
  <Prefix></Prefix>
  <Marker>boo/</Marker>
  <MaxKeys>1</MaxKeys>
  <Delimiter>/</Delimiter>
  <IsTruncated>false</IsTruncated>
  <CommonPrefixes>
    <Prefix>cquux/</Prefix>
  </CommonPrefixes>
</ListBucketResult>
@Basho-JIRA Basho-JIRA changed the title Unnecessary NextMarker in Get Bucket's response if CommonPrefixes contain the last key. Unnecessary NextMarker in Get Bucket's response if CommonPrefixes contain the last key. [JIRA: RCS-155] Mar 19, 2015
@shino
Copy link
Contributor

shino commented Aug 11, 2015

(Will be) addressed by #1212

@Basho-JIRA
Copy link

For release note: this change is part of RCS-257, please refer its comment.

_[posted via JIRA by Shunichi Shinohara]_

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

No branches or pull requests

4 participants