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

fix test withno appdata #991

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ TConclusionStatus TGeneralCompactColumnEngineChanges::DoConstructBlobs(TConstruc
NChanges::TGeneralCompactionCounters::OnPortionsKind(insertedPortionsSize, compactedPortionsSize, otherPortionsSize);
NChanges::TGeneralCompactionCounters::OnRepackPortions(portionsCount, portionsSize);

if (AppDataVerified().ColumnShardConfig.GetUseChunkedMergeOnCompaction()) {
if (!HasAppData() || AppDataVerified().ColumnShardConfig.GetUseChunkedMergeOnCompaction()) {
BuildAppendedPortionsByChunks(context);
} else {
BuildAppendedPortionsByFullBatches(context);
Expand Down
10 changes: 5 additions & 5 deletions ydb/core/tx/columnshard/engines/ut_insert_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ class TTestInsertTableDB : public IDbWrapper {
return true;
}

void WriteColumn(ui32, const TPortionInfo&, const TColumnRecord&) override {}
void EraseColumn(ui32, const TPortionInfo&, const TColumnRecord&) override {}
bool LoadColumns(ui32, const std::function<void(const TPortionInfo&, const TColumnChunkLoadContext&)>&) override { return true; }
void WriteColumn(const TPortionInfo&, const TColumnRecord&) override {}
void EraseColumn(const TPortionInfo&, const TColumnRecord&) override {}
bool LoadColumns(const std::function<void(const TPortionInfo&, const TColumnChunkLoadContext&)>&) override { return true; }

void WriteCounter(ui32, ui32, ui64) override {}
bool LoadCounters(ui32, const std::function<void(ui32 id, ui64 value)>&) override { return true; }
void WriteCounter(ui32, ui64) override {}
bool LoadCounters(const std::function<void(ui32 id, ui64 value)>&) override { return true; }
};

}
Expand Down
20 changes: 10 additions & 10 deletions ydb/core/tx/columnshard/engines/ut_logs_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ class TTestDbWrapper : public IDbWrapper {
return true;
}

void WriteColumn(ui32 index, const TPortionInfo& portion, const TColumnRecord& row) override {
void WriteColumn(const TPortionInfo& portion, const TColumnRecord& row) override {
auto proto = portion.GetMeta().SerializeToProto(row.ColumnId, row.Chunk);
auto rowProto = row.GetMeta().SerializeToProto();
if (proto) {
*rowProto.MutablePortionMeta() = std::move(*proto);
}

auto& data = Indices[index].Columns[portion.GetPathId()];
auto& data = Indices[0].Columns[portion.GetPathId()];
NOlap::TColumnChunkLoadContext loadContext(row.GetAddress(), row.BlobRange, rowProto);
auto itInsertInfo = LoadContexts[portion.GetAddress()].emplace(row.GetAddress(), loadContext);
if (!itInsertInfo.second) {
Expand Down Expand Up @@ -104,8 +104,8 @@ class TTestDbWrapper : public IDbWrapper {
}
}

void EraseColumn(ui32 index, const TPortionInfo& portion, const TColumnRecord& row) override {
auto& data = Indices[index].Columns[portion.GetPathId()];
void EraseColumn(const TPortionInfo& portion, const TColumnRecord& row) override {
auto& data = Indices[0].Columns[portion.GetPathId()];
auto it = data.find(portion.GetPortion());
Y_ABORT_UNLESS(it != data.end());
auto& portionLocal = it->second;
Expand All @@ -119,8 +119,8 @@ class TTestDbWrapper : public IDbWrapper {
portionLocal.Records.swap(filtered);
}

bool LoadColumns(ui32 index, const std::function<void(const TPortionInfo&, const TColumnChunkLoadContext&)>& callback) override {
auto& columns = Indices[index].Columns;
bool LoadColumns(const std::function<void(const TPortionInfo&, const TColumnChunkLoadContext&)>& callback) override {
auto& columns = Indices[0].Columns;
for (auto& [pathId, portions] : columns) {
for (auto& [portionId, portionLocal] : portions) {
auto copy = portionLocal;
Expand All @@ -137,13 +137,13 @@ class TTestDbWrapper : public IDbWrapper {
return true;
}

void WriteCounter(ui32 index, ui32 counterId, ui64 value) override {
auto& counters = Indices[index].Counters;
void WriteCounter(ui32 counterId, ui64 value) override {
auto& counters = Indices[0].Counters;
counters[counterId] = value;
}

bool LoadCounters(ui32 index, const std::function<void(ui32 id, ui64 value)>& callback) override {
auto& counters = Indices[index].Counters;
bool LoadCounters(const std::function<void(ui32 id, ui64 value)>& callback) override {
auto& counters = Indices[0].Counters;
for (auto& [id, value] : counters) {
callback(id, value);
}
Expand Down
Loading