-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
cloudimpl: cache suffix in remote file sst wrapper #59478
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @adityamaru and @dt)
pkg/ccl/storageccl/import.go, line 409 at r1 (raw file):
// readAndCacheSuffix caches the `size` suffix of the file (which could the // whole file) for use by later ReadAt calls to avoid making additional RPCs. func (r *sstReader) readAndCacheSuffix(size int64) error {
Should we add a test for that?
Could be as simple as wrapping real sstReader w/ testReader which counts number of ReadAt calls, and then try reading a small sstable...
Release note: none.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @adityamaru and @miretskiy)
pkg/ccl/storageccl/import.go, line 409 at r1 (raw file):
Previously, miretskiy (Yevgeniy Miretskiy) wrote…
Should we add a test for that?
Could be as simple as wrapping real sstReader w/ testReader which counts number of ReadAt calls, and then try reading a small sstable...
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r3.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @adityamaru and @miretskiy)
Reading SSTs starts with multiple tiny reads in offsets near the end of the file. If we can read that whole region once and fulfill those reads from a cached buffer, we can avoid repeated RPCs. Release note: none.
TFTR! bors r+ |
Build failed (retrying...): |
Build succeeded: |
Reading SSTs starts with multiple tiny reads in offsets near the end of the file.
If we can read that whole region once and fulfill those reads from a cached buffer,
we can avoid repeated RPCs.
Release note: none.