You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR introduces a new table function fuse_vacuum2() aimed at enhancing performance.
Object Key of Snapshot v5, Segment, and Block
UUID Version: Use UUID v7
Lexicographically ordered
Timestamp can be extracted from the object key
Prefix: Prefixed with the character 'g', ensuring all keys of v5 are larger than v4's in lexicographical order
For segments/blocks that are newly created in an operation based on snapshot s, the timestamp embedded in their object keys equals s.timestamp. If there is no base snapshot, let ts be 0. For snapshots, the timestamp embedded in their object keys equals to their own timestamp.
New Field lvt in Snapshot v5
For all snapshots v5 (s), the candidate value (lvt_candidate) of s.lvt is calculated as s.timestamp - settings.get_retention_period(). s.lvt may be adjusted to larger values based on lvt_candidate, in cases where the retention period has been tweaked or due to clock skews. For example, if lvt_candidate <= s.prev.lvt, then s.lvt could be set to s.prev.lvt + 1. s.lvt should respect the retention period setting at the time. Decreasing or setting s.lvt equal to the lvt of the previous snapshot is not allowed.
Properties
s.lvt <= s.timestamp
s.lvt > s.prev.lvt
If s is based on another snapshot s': s.lvt <= s'.timestamp (enforced during commitment: transactions with stale base snapshots are not allowed).
ci-cloudBuild docker image for cloud testpr-featurethis PR introduces a new feature to the codebase
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
This PR introduces a new table function
fuse_vacuum2()
aimed at enhancing performance.Object Key of Snapshot v5, Segment, and Block
For segments/blocks that are newly created in an operation based on snapshot
s
, the timestamp embedded in their object keys equalss.timestamp
. If there is no base snapshot, letts
be0
. For snapshots, the timestamp embedded in their object keys equals to their own timestamp.New Field
lvt
in Snapshot v5For all snapshots v5 (
s
), the candidate value (lvt_candidate
) ofs.lvt
is calculated ass.timestamp - settings.get_retention_period()
.s.lvt
may be adjusted to larger values based onlvt_candidate
, in cases where the retention period has been tweaked or due to clock skews. For example, iflvt_candidate <= s.prev.lvt
, thens.lvt
could be set tos.prev.lvt + 1
.s.lvt
should respect the retention period setting at the time. Decreasing or settings.lvt
equal to thelvt
of the previous snapshot is not allowed.Properties
s.lvt <= s.timestamp
s.lvt > s.prev.lvt
s
is based on another snapshots'
:s.lvt <= s'.timestamp
(enforced during commitment: transactions with stale base snapshots are not allowed).Notes
Some(_) > None
s.prev
may not equals'
Steps of Vacuum2
Tests
Type of change
This change is