Skip to content
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

BTreeIndex Charge Groups #1224

Merged
merged 16 commits into from
Jan 25, 2024
8 changes: 6 additions & 2 deletions ydb/core/tablet_flat/flat_part_charge.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace NTable {
using TDataPage = NPage::TDataPage;
using TGroupId = NPage::TGroupId;

TCharge(IPages *env, const TPart &part, TTagsRef tags, bool includeHistory = false)
TCharge(IPages *env, const TPart &part, TTagsRef tags, bool includeHistory)
: Env(env)
, Part(&part)
, Scheme(*Part->Scheme)
Expand Down Expand Up @@ -326,7 +326,11 @@ namespace NTable {
if (key1Page && key1Page == current) {
if (needExactBounds && page) {
auto key1RowId = LookupRowIdReverse(key1, page, Scheme.Groups[0], ESeek::Lower, keyDefaults);
prechargeCurrentFirstRowId = Min(prechargeCurrentFirstRowId, key1RowId);
if (key1RowId != Max<TRowId>()) { // Max<TRowId>() means that lower bound is before current page, so doesn't charge current page
prechargeCurrentFirstRowId = Min(prechargeCurrentFirstRowId, key1RowId);
} else {
prechargeCurrentLastRowId = Max<TRowId>(); // no precharge
}
} else {
prechargeCurrentLastRowId = Max<TRowId>(); // no precharge
}
Expand Down
Loading
Loading