Both IncompleteHummockVersion and HummockVersion use PbHummockVersion as the meta store type for persistence.
In time_travel.rs, whenever reading PbHummockVersion from the meta store, the counterpart in-mem structs should be IncompleteHummockVersion. Because in time_travel metadata, only sst_id and object_id of a SstableInfo are stored in PbHummockVersion, while other fields are left to default.
However, currently in time_travel.rs, HummockVersion is incorrectly used instead of IncompleteHummockVersion. This generates an SstableInfo with correct sst_id and object_id fields, but other fields are incorrect. It doesn't cause a correctness issue because other fields are not utilized intime_travel.rs, for now.
To prevent potential future bugs, this PR ensures that time_travel.rs uses the IncompleteHummockVersion and IncompleteHummockVersionDelta correctly. Methods required by time_travel.rs are moved from HummockVersion to HummockVersionCommon<T>.
Since there's no correctness issue for now, this PR won't be cherry-picked to release 2.1.
Checklist
[ ] I have written necessary rustdoc comments
[ ] I have added necessary unit tests and integration tests
[ ] I have added test labels as necessary. See details.
[ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #7934).
[ ] My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
[ ] All checks passed in ./risedev check (or alias, ./risedev c)
[ ] My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
[ ] My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)
Documentation
[ ] My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Both
IncompleteHummockVersion
andHummockVersion
usePbHummockVersion
as the meta store type for persistence.In
time_travel.rs
, whenever readingPbHummockVersion
from the meta store, the counterpart in-mem structs should beIncompleteHummockVersion
. Because in time_travel metadata, onlysst_id
andobject_id
of aSstableInfo
are stored inPbHummockVersion
, while other fields are left to default.However, currently in
time_travel.rs
,HummockVersion
is incorrectly used instead ofIncompleteHummockVersion
. This generates anSstableInfo
with correctsst_id
andobject_id
fields, but other fields are incorrect. It doesn't cause a correctness issue because other fields are not utilized intime_travel.rs
, for now.To prevent potential future bugs, this PR ensures that
time_travel.rs
uses theIncompleteHummockVersion
andIncompleteHummockVersionDelta
correctly. Methods required bytime_travel.rs
are moved fromHummockVersion
toHummockVersionCommon<T>
.Since there's no correctness issue for now, this PR won't be cherry-picked to release 2.1.
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.