7
7
8
8
namespace NKikimr ::NOlap {
9
9
10
- void TInsertColumnEngineChanges::DoWriteIndexOnExecute (NColumnShard::TColumnShard& self, TWriteIndexContext& context) {
10
+ void TInsertColumnEngineChanges::DoWriteIndexOnExecute (NColumnShard::TColumnShard* self, TWriteIndexContext& context) {
11
11
TBase::DoWriteIndexOnExecute (self, context);
12
- auto removing = BlobsAction.GetRemoving (IStoragesManager::DefaultStorageId);
13
- for (const auto & insertedData : DataToIndex) {
14
- self.InsertTable ->EraseCommittedOnExecute (context.DBWrapper , insertedData, removing);
12
+ if (self) {
13
+ auto removing = BlobsAction.GetRemoving (IStoragesManager::DefaultStorageId);
14
+ for (const auto & insertedData : DataToIndex) {
15
+ self->InsertTable ->EraseCommittedOnExecute (context.DBWrapper , insertedData, removing);
16
+ }
15
17
}
16
18
}
17
19
@@ -26,17 +28,19 @@ void TInsertColumnEngineChanges::DoStart(NColumnShard::TColumnShard& self) {
26
28
self.BackgroundController .StartIndexing (*this );
27
29
}
28
30
29
- void TInsertColumnEngineChanges::DoWriteIndexOnComplete (NColumnShard::TColumnShard& self, TWriteIndexCompleteContext& context) {
31
+ void TInsertColumnEngineChanges::DoWriteIndexOnComplete (NColumnShard::TColumnShard* self, TWriteIndexCompleteContext& context) {
30
32
TBase::DoWriteIndexOnComplete (self, context);
31
- for (const auto & insertedData : DataToIndex) {
32
- self.InsertTable ->EraseCommittedOnComplete (insertedData);
33
- }
34
- if (!DataToIndex.empty ()) {
35
- self.UpdateInsertTableCounters ();
33
+ if (self) {
34
+ for (const auto & insertedData : DataToIndex) {
35
+ self->InsertTable ->EraseCommittedOnComplete (insertedData);
36
+ }
37
+ if (!DataToIndex.empty ()) {
38
+ self->UpdateInsertTableCounters ();
39
+ }
40
+ self->IncCounter (NColumnShard::COUNTER_INDEXING_BLOBS_WRITTEN, context.BlobsWritten );
41
+ self->IncCounter (NColumnShard::COUNTER_INDEXING_BYTES_WRITTEN, context.BytesWritten );
42
+ self->IncCounter (NColumnShard::COUNTER_INDEXING_TIME, context.Duration .MilliSeconds ());
36
43
}
37
- self.IncCounter (NColumnShard::COUNTER_INDEXING_BLOBS_WRITTEN, context.BlobsWritten );
38
- self.IncCounter (NColumnShard::COUNTER_INDEXING_BYTES_WRITTEN, context.BytesWritten );
39
- self.IncCounter (NColumnShard::COUNTER_INDEXING_TIME, context.Duration .MilliSeconds ());
40
44
}
41
45
42
46
void TInsertColumnEngineChanges::DoOnFinish (NColumnShard::TColumnShard& self, TChangesFinishContext& /* context*/ ) {
0 commit comments