-
Notifications
You must be signed in to change notification settings - Fork 879
Include receipt store earliest height in watermark bounds to prevent silent undercount on pruned blocks #3216
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
base: main
Are you sure you want to change the base?
Changes from 6 commits
6128cf8
7564da3
8fdda3d
7f454f4
e8ea516
20438fe
64af9f3
8628a38
83d3cdc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -181,6 +181,11 @@ func (s *Store) SetEarliestVersion(version int64) { | |
| s.earliestVersion.Store(version) | ||
| } | ||
|
|
||
| // EarliestVersion returns the earliest version retained in the store. | ||
| func (s *Store) EarliestVersion() int64 { | ||
| return s.earliestVersion.Load() | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like CC @jewei1997 for context.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @masih That is a nice observation. The earliest version in parquet store remains zero even after pruning, unlike other store implementations like
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, it would make sense to fix this issue first in a separate PR, before landing this one. To be clear, @jewei1997 would love your eyes on this; would you be able to take on the fix for
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes can do that. |
||
| } | ||
|
|
||
| // CacheRotateInterval returns the interval at which the cache should rotate. | ||
| func (s *Store) CacheRotateInterval() uint64 { | ||
| return s.config.MaxBlocksPerFile | ||
|
|
||
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.
Trying to wrap my head around this. Is there something special about this? Is it not generalized in the if-statement below it?
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.
Thanks for feedback. That is a good point as the if statement below will not cause error since height is non-negative. I will remove it.