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

Eliminate some parameters redundant with ReadOptions #12761

Closed
wants to merge 1 commit into from

Conversation

pdillinger
Copy link
Contributor

Summary: ... in Index and CompressionDict readers (Filters in another PR). no_io and verify_checksums should be inferred from ReadOptions rather than specified redundantly.

Fixes incomplete propagation of ReadOptions in
UncompressionDictReader::GetOrReadUncompressionDictionar so is technically a functional change. (Related to #12757)

Also there was hardcoded no verify_checksums in DumpTable, but only for UncompressionDict, which doesn't make sense. Now using consistent ReadOptions and verify_checksum can be controlled for more reads together.

Test Plan: existing tests

Summary: ... in Index and CompressionDict readers (Filters in another
PR). no_io and verify_checksums should be inferred from ReadOptions
rather than specified redundantly.

Fixes incomplete propagation of ReadOptions in
UncompressionDictReader::GetOrReadUncompressionDictionar
so is technically a functional change. (Related to facebook#12757)

Also there was hardcoded no verify_checksums in DumpTable, but only for
UncompressionDict, which doesn't make sense. Now using consistent
ReadOptions and verify_checksum can be controlled for more reads
together.

Test Plan: existing tests
@facebook-github-bot
Copy link
Contributor

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

GetOrReadIndexBlock(/*no_io=*/true, /*get_context=*/nullptr,
/*lookup_context=*/nullptr, &top_level_block,
ReadOptions{})
ReadOptions ro_no_io;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this intentional that we don't pass down read options here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We aren't in the context of a read operation (no ReadOptions passed in), but we are in a context where we are very much forbidden from reading from storage, because that would destroy the purpose of pro-actively erasing obsolete cache entries.

@facebook-github-bot
Copy link
Contributor

@pdillinger merged this pull request in 5cf3bed.

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.

3 participants