-
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
storage: use new range tombstone stack for gc ops #86742
Conversation
pkg/storage/mvcc.go
Outdated
rangeTombstoneTss = rangeTombstoneTss[:0] | ||
for _, v := range rangeKeys.Versions { | ||
rangeTombstoneTss = append(rangeTombstoneTss, v.Timestamp) | ||
// We can rely on range key changed iterator functionality here as we do |
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.
// We can rely on range key changed iterator functionality here as we do | |
// We can't rely on range key changed iterator functionality here as we do |
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.
RangeKeyChanged()
does fire correctly on seek operations too, but one has to take care to track it for every positioning operation. I'm fine with not doing it now though, this is simple and more obviously correct.
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 think tracking for all Next() is a non-starter here for now. We rely on get metadata to seek and potentially Next() as a side effect +all the subsequent iterations. We'll have to hasChanged |= iter.RangeKeyChaneged()
through the whole method till it reaches this point. That would be too fragile even if we know that key doesn't change while iterating key's versions.
This commit replaces bespoke range tombstone stack manipulation logic with functions provided by MVCCRangeKeyStack type. Release justification: code cleanup not changing functionality. Release note: None
9460e0f
to
40962cf
Compare
bors r+ |
This PR was included in a batch that was canceled, it will be automatically retried |
Build failed (retrying...): |
Build succeeded: |
This commit modifies the sqlsmith logic to add all columns to the `OVER` clause for all window functions except for the ranking functions. This is necessary because all other window/aggregate functions can produce different results for different rows within a peer group. Ordering on all columns ensures that we are ordering on a key, which restricts each peer group to one row (and therefore ensures there is only one possible order within each peer group). This commit also reverts cockroachdb#86742, since window functions should now be deterministic. Fixes cockroachdb#87353 Release note: None
87591: roachtest: make window functions deterministic r=DrewKimball a=DrewKimball This commit modifies the sqlsmith logic to add all columns to the `OVER` clause for all window functions except for the ranking functions. This is necessary because all other window/aggregate functions can produce different results for different rows within a peer group. Ordering on all columns ensures that we are ordering on a key, which restricts each peer group to one row (and therefore ensures there is only one possible order within each peer group). This commit also reverts #86742, since window functions should now be deterministic. Fixes #87353 Release note: None Co-authored-by: DrewKimball <[email protected]>
This commit replaces bespoke range tombstone stack manipulation
logic with functions provided by MVCCRangeKeyStack type.
Release justification: code cleanup not changing functionality.
Release note: None