aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorivanmorozov <ivanmorozov@yandex-team.com>2023-11-22 15:18:02 +0300
committerivanmorozov <ivanmorozov@yandex-team.com>2023-11-22 18:06:24 +0300
commit8bdf165418cc7acd5e30eab6a3b39486395744c6 (patch)
treeceadf8971878212a40cab741f786305a0438727d
parent63d10358c18102d317af3e4e2fc77b18004e1721 (diff)
downloadydb-8bdf165418cc7acd5e30eab6a3b39486395744c6.tar.gz
KIKIMR-19852: remove useless cache
-rw-r--r--ydb/core/tx/columnshard/engines/reader/read_metadata.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/ydb/core/tx/columnshard/engines/reader/read_metadata.h b/ydb/core/tx/columnshard/engines/reader/read_metadata.h
index 706d951cf9..af6fa21bff 100644
--- a/ydb/core/tx/columnshard/engines/reader/read_metadata.h
+++ b/ydb/core/tx/columnshard/engines/reader/read_metadata.h
@@ -129,8 +129,6 @@ private:
TVersionedIndex IndexVersions;
TSnapshot Snapshot;
std::shared_ptr<ISnapshotSchema> ResultIndexSchema;
- mutable std::map<TSnapshot, ISnapshotSchema::TPtr> SchemasByVersionCache;
- mutable ISnapshotSchema::TPtr EmptyVersionSchemaCache;
public:
using TConstPtr = std::shared_ptr<const TReadMetadata>;
@@ -176,17 +174,9 @@ public:
ISnapshotSchema::TPtr GetLoadSchema(const std::optional<TSnapshot>& version = {}) const {
if (!version) {
- if (!EmptyVersionSchemaCache) {
- EmptyVersionSchemaCache = ResultIndexSchema;
- }
- return EmptyVersionSchemaCache;
- }
- auto schemaOriginal = IndexVersions.GetSchema(*version);
- auto it = SchemasByVersionCache.find(schemaOriginal->GetSnapshot());
- if (it == SchemasByVersionCache.end()) {
- it = SchemasByVersionCache.emplace(schemaOriginal->GetSnapshot(), schemaOriginal).first;
+ return ResultIndexSchema;
}
- return it->second;
+ return IndexVersions.GetSchema(*version);
}
std::shared_ptr<arrow::Schema> GetBlobSchema(const ui64 version) const {