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

Update passing rate_limiter_priority for a PartitionedFilterBlockReader function to FS #10438

Closed
wants to merge 4 commits into from

Conversation

gitbw95
Copy link
Contributor

@gitbw95 gitbw95 commented Jul 29, 2022

Summary:
Add param rate_limiter_parameter in PartitionedFilterBlockReader::GetFilterPartitionBlock .

Test Plan:
Unit Tests.

@facebook-github-bot
Copy link
Contributor

@gitbw95 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@gitbw95 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@gitbw95 has updated the pull request. You must reimport the pull request before landing.

@gitbw95 gitbw95 changed the title Update passing rate_limiter_priority for a few functions to FS Update passing rate_limiter_priority for a PartitionedFilterBlockReader function to FS Jul 29, 2022
@facebook-github-bot
Copy link
Contributor

@gitbw95 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@gitbw95 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@gitbw95 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@gitbw95 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@@ -304,6 +305,7 @@ Status PartitionedFilterBlockReader::GetFilterPartitionBlock(
}

ReadOptions read_options;
read_options.rate_limiter_priority = rate_limiter_priority;
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like the root cause of this issue is that GetFilterPartitionBlock() was pretending to have a proper ReadOptions. I think it would be better if we could plumb the operation's (e.g., Get()'s) ReadOptions down into GetFilterPartitionBlock() and use it here. Is it possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In #10251 , we have passed the rate_limiter_priority from BlockBasedTable to MayMatch functions. I missed passing rate_limiter_priority into GetFilterPartitionBlock.

For ReadOptions param:

  1. I roughly remember that we just wanted to pass a light-weight rate_limiter_priority rather than ReadOptions into the filter functions.
  2. The filter functions may not need all the options from ReadOptions of the caller (e.g. Get()).

cc @pdillinger

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree it makes sense to refactor at some point to pass the operation's ReadOptions down to all the filter functions. But not all the options may be appropriate, so we eventually have to filter out the unnecessary ones before calling RetrieveBlock.

Copy link
Contributor

@anand1976 anand1976 left a comment

Choose a reason for hiding this comment

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

LGTM. As mentioned in the comments, I think we should revisit how the options are passed down.

@@ -304,6 +305,7 @@ Status PartitionedFilterBlockReader::GetFilterPartitionBlock(
}

ReadOptions read_options;
read_options.rate_limiter_priority = rate_limiter_priority;
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree it makes sense to refactor at some point to pass the operation's ReadOptions down to all the filter functions. But not all the options may be appropriate, so we eventually have to filter out the unnecessary ones before calling RetrieveBlock.

gitbw95 pushed a commit to gitbw95/rocksdb that referenced this pull request Aug 2, 2022
…er function to FS (facebook#10438)

Summary:
Add param rate_limiter_parameter in PartitionedFilterBlockReader::GetFilterPartitionBlock .

Pull Request resolved: facebook#10438

Test Plan: Unit Tests.

Reviewed By: anand1976

Differential Revision: D38266395

Pulled By: gitbw95

fbshipit-source-id: 3ed062a3b43d6df323371cb0d266f7fe869e9ad2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants