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

Enhance: introduce ReadDirLimit_ll request #1234

Merged
merged 3 commits into from
Oct 14, 2021

Conversation

shuoranliu
Copy link
Member

This commit introduces a new request in metanode which returns limited
number of dentries starting from 'marker', but not all the dentries in
a directory. Because in S3 interface, the client usually does not want
to retrieve all the objects in a single request. This commit can offload
the ReadDir overhead of metanodes significantly if there are millions of
objects in a single directory and objectnode is retrieving only 1000 of
the dentries.

Signed-off-by: zhuzhengyi001 zhuzhengyi001@ke.com
Signed-off-by: Shuoran Liu shuoranliu@gmail.com

What this PR does / why we need it:

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Release note:

zhuzhengyi001 and others added 3 commits October 13, 2021 20:33
This commit introduces a new request in metanode which returns limited
number of dentries starting from 'marker', but not all the dentries in
a directory. Because in S3 interface, the client usually does not want
to retrieve all the objects in a single request. This commit can offload
the ReadDir overhead of metanodes significantly if there are millions of
objects in a single directory and objectnode is retrieving only 1000 of
the dentries.

Signed-off-by: zhuzhengyi001 <zhuzhengyi001@ke.com>
Signed-off-by: Shuoran Liu <shuoranliu@gmail.com>
Signed-off-by: zhuzhengyi001 <zhuzhengyi001@ke.com>
Suppose there are several files under the root directory: /a000, /a001,
/a002, /a003, /ab000, /ab001

Issue a ListObjects request with the following parameters: Prefix[/ab],
MaxKeys[2], ContinuationToken[], then there is no entries returned since
metanode returns {/a000, /a001} in such circumstance which are all
smaller than the Prefix.

This commit compares the Prefix and ContinuationToken and takes the
larger one as search starting point.

Signed-off-by: Shuoran Liu <shuoranliu@gmail.com>
@shuoranliu shuoranliu merged commit f362b86 into cubefs:master Oct 14, 2021
@shuoranliu shuoranliu deleted the readdirlimit branch January 20, 2022 04:59
awzhgw pushed a commit that referenced this pull request Jan 21, 2024
… 17:44:32

fix: multirate concurrency panic on reset
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

2 participants