@@ -16,16 +16,16 @@ class TMinMaxSnapshotChangesTask: public NConveyor::ITask {
16
16
private:
17
17
THashMap<NKikimr::NOlap::TBlobRange, TString> Blobs;
18
18
TDataContainer Portions;
19
- THashMap<ui64, ISnapshotSchema::TPtr> Schemas;
19
+ std::shared_ptr< THashMap<ui64, ISnapshotSchema::TPtr> > Schemas;
20
20
TNormalizationContext NormContext;
21
21
protected:
22
22
virtual bool DoExecute () override {
23
- Y_ABORT_UNLESS (!Schemas. empty ());
24
- auto pkColumnIds = Schemas. begin ()->second ->GetPkColumnsIds ();
23
+ Y_ABORT_UNLESS (!Schemas-> empty ());
24
+ auto pkColumnIds = Schemas-> begin ()->second ->GetPkColumnsIds ();
25
25
pkColumnIds.insert (TIndexInfo::GetSpecialColumnIds ().begin (), TIndexInfo::GetSpecialColumnIds ().end ());
26
26
27
27
for (auto && portionInfo : Portions) {
28
- auto blobSchema = Schemas. FindPtr (portionInfo->GetPortionId ());
28
+ auto blobSchema = Schemas-> FindPtr (portionInfo->GetPortionId ());
29
29
THashMap<TBlobRange, TPortionInfo::TAssembleBlobInfo> blobsDataAssemble;
30
30
for (auto && i : portionInfo->Records ) {
31
31
auto blobIt = Blobs.find (i.BlobRange );
@@ -47,10 +47,10 @@ class TMinMaxSnapshotChangesTask: public NConveyor::ITask {
47
47
}
48
48
49
49
public:
50
- TMinMaxSnapshotChangesTask (THashMap<NKikimr::NOlap::TBlobRange, TString>&& blobs, const TNormalizationContext& nCtx, TDataContainer&& portions, THashMap<ui64, ISnapshotSchema::TPtr>&& schemas)
50
+ TMinMaxSnapshotChangesTask (THashMap<NKikimr::NOlap::TBlobRange, TString>&& blobs, const TNormalizationContext& nCtx, TDataContainer&& portions, std::shared_ptr< THashMap<ui64, ISnapshotSchema::TPtr>> schemas)
51
51
: Blobs(std::move(blobs))
52
52
, Portions(std::move(portions))
53
- , Schemas(std::move( schemas) )
53
+ , Schemas(schemas)
54
54
, NormContext(nCtx)
55
55
{}
56
56
@@ -135,7 +135,7 @@ TConclusion<std::vector<INormalizerTask::TPtr>> TPortionsNormalizer::Init(const
135
135
}
136
136
137
137
THashMap<ui64, std::shared_ptr<TPortionInfo>> portions;
138
- THashMap<ui64, ISnapshotSchema::TPtr> schemas ;
138
+ auto schemas = std::make_shared< THashMap<ui64, ISnapshotSchema::TPtr>>() ;
139
139
auto pkColumnIds = TMinMaxSnapshotChangesTask::GetColumnsFilter (tablesManager.GetPrimaryIndexSafe ().GetVersionedIndex ().GetLastSchema ());
140
140
141
141
{
@@ -161,7 +161,7 @@ TConclusion<std::vector<INormalizerTask::TPtr>> TPortionsNormalizer::Init(const
161
161
auto portionMeta = loadContext.GetPortionMeta ();
162
162
if (it == portions.end ()) {
163
163
Y_ABORT_UNLESS (portion.Records .empty ());
164
- schemas[portion.GetPortionId ()] = currentSchema;
164
+ (* schemas) [portion.GetPortionId ()] = currentSchema;
165
165
auto portionNew = std::make_shared<TPortionInfo>(portion);
166
166
portionNew->AddRecord (currentSchema->GetIndexInfo (), rec, portionMeta);
167
167
it = portions.emplace (portion.GetPortion (), portionNew).first ;
@@ -202,7 +202,7 @@ TConclusion<std::vector<INormalizerTask::TPtr>> TPortionsNormalizer::Init(const
202
202
}
203
203
++brokenPortioncCount;
204
204
package.emplace_back (portion.second );
205
- if (package.size () == 100 ) {
205
+ if (package.size () == 1000 ) {
206
206
std::vector<std::shared_ptr<TPortionInfo>> local;
207
207
local.swap (package);
208
208
tasks.emplace_back (std::make_shared<TPortionsNormalizerTask<TMinMaxSnapshotChangesTask>>(std::move (local), schemas));
0 commit comments