-
Notifications
You must be signed in to change notification settings - Fork 519
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
Parquet page caching #3196
Parquet page caching #3196
Conversation
a66dc57
to
e128456
Compare
@joe-elliott Will we need doc for this? I can create a doc issue, if so. |
@knylander-grafana good call. in this PR i'll add the existence of the new settings option. for the next release (or before) we should consider the following docs regarding the caching changes:
|
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
f5efb56
to
ec8fbe6
Compare
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
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.
This looks pretty good to me. Nice work.
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.
LGTM
@@ -89,7 +89,16 @@ func (p *provider) starting(_ context.Context) error { | |||
} | |||
|
|||
func (p *provider) stopping(_ error) error { | |||
// we can only stop a cache once (or they panic). use this map | |||
// to track which caches we've stopped. | |||
stopped := map[cache.Cache]struct{}{} |
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.
I'm not sure if I understand this correctly: is this necessary because p.caches
contain the same cache multiple times?
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.
Yup. If a cache has multiple roles we add it to the map multiple times here:
Lines 60 to 62 in 8d0ddfd
for _, role := range cacheCfg.Role { | |
p.caches[role] = c | |
} |
So this is just a bit of bookkeeping to prevent stopping one twice.
What this PR does:
Builds on #3166 to add parquet "page" level caching. Since reads from the parquet library are opaque we don't actually attempt to determine whether or not a given read is a page. Instead we simply use the read buffer size which controls how much data is pulled at once from object storage.
Other fixes/changes:
Points of discussion:
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]