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

Performance optimization for object listing requests using a prefix #804

Merged

Conversation

kellymclaughlin
Copy link
Contributor

  • Use prefix in start key calculation when appropriate to avoid
    iterating over unnecessary keys that lexicographically sort less
    than the prefix. The make_start_key_from_marker function in
    riak_cs_list_objects_fsm_v2 is renamed to
    make_start_key_from_marker_and_prefix.
  • Terminate processing early when a prefix is specified and a key is
    reached that lexicographically sorts greater than the prefix, but
    does not begin with the prefix. The results come back in sorted key
    order so it can be assumed that once any keys that begin with the
    prefix are processed it is appropriate to cease processing without
    requesting any more data. This is accomplished by the addition of
    the reached_end-of_keyspace/4 function to the
    riak_cs_list_objects_fsm_v2 module.
  • Silence extraneous console logging in riak_cs_list_objects_fsm_v2_eqc test

* Use prefix in start key calculation when appropriate to avoid
  iterating over unnecessary keys that lexicographically sort less
  than the prefix. The make_start_key_from_marker function in
  riak_cs_list_objects_fsm_v2 is renamed to
  make_start_key_from_marker_and_prefix.
* Terminate processing early when a prefix is specified and a key is
  reached that lexicographically sorts greater than the prefix, but
  does not begin with the prefix. The results come back in sorted key
  order so it can be assumed that once any keys that begin with the
  prefix are processed it is appropriate to cease processing without
  requesting any more data. This is accomplished by the addition of
  the reached_end-of_keyspace/4 function to the
  riak_cs_list_objects_fsm_v2 module.
* Silence extraneous console logging in riak_cs_list_objects_fsm_v2_eqc test
@andrewjstone
Copy link
Contributor

  • riak_test
  • eunit + eqc
  • dialyzer
  • xref

@andrewjstone
Copy link
Contributor

Nice work @kellymclaughlin. 👍

@kellymclaughlin kellymclaughlin merged commit 0a7e359 into release/1.4 Feb 11, 2014
@kellymclaughlin kellymclaughlin deleted the bugfix/list-objects-prefix-optimizations branch February 11, 2014 22:59
@shino
Copy link
Contributor

shino commented Feb 12, 2014

Is this #802 related?

@andrewjstone
Copy link
Contributor

Yep. It's the fix for that.

On Tue, Feb 11, 2014 at 10:07 PM, Shunichi Shinohara <
notifications@github.com> wrote:

Is this #802 #802 related?

Reply to this email directly or view it on GitHubhttps://github.com//pull/804#issuecomment-34834636
.

@reiddraper
Copy link
Contributor

Thanks for taking care of this, great work!

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

4 participants