diff options
| -rw-r--r-- | ydb/core/nbs/cloud/blockstore/libs/storage/partition_direct/direct_block_group_impl.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ydb/core/nbs/cloud/blockstore/libs/storage/partition_direct/direct_block_group_impl.cpp b/ydb/core/nbs/cloud/blockstore/libs/storage/partition_direct/direct_block_group_impl.cpp index 46a92914b94..c124311c3d5 100644 --- a/ydb/core/nbs/cloud/blockstore/libs/storage/partition_direct/direct_block_group_impl.cpp +++ b/ydb/core/nbs/cloud/blockstore/libs/storage/partition_direct/direct_block_group_impl.cpp @@ -293,7 +293,9 @@ TDirectBlockGroup::ReadBlocksFromDDisk( if (DDiskConnections[hostIndex].SessionState != EDDiskSessionState::Locked) { - childSpan->Event("WaitConnectionReady"); + if (childSpan) { + childSpan->Event("WaitConnectionReady"); + } auto waitReadyCb = [weakSelf = weak_from_this(), promise = std::move(promise), @@ -496,7 +498,9 @@ TDirectBlockGroup::WriteBlocksToDDisk( if (DDiskConnections[hostIndex].SessionState != EDDiskSessionState::Locked) { - childSpan->Event("WaitConnectionReady"); + if (childSpan) { + childSpan->Event("WaitConnectionReady"); + } auto waitReadyCb = [weakSelf = weak_from_this(), promise = std::move(promise), @@ -848,7 +852,9 @@ NThreading::TFuture<TDBGFlushResponse> TDirectBlockGroup::SyncWithPBuffer( if (DDiskConnections[ddiskHostIndex].SessionState != EDDiskSessionState::Locked) { - childSpan->Event("WaitConnectionReady"); + if (childSpan) { + childSpan->Event("WaitConnectionReady"); + } auto cb = CreateWaitSessionCbForSyncWithPBuffer( std::move(promise), @@ -857,7 +863,7 @@ NThreading::TFuture<TDBGFlushResponse> TDirectBlockGroup::SyncWithPBuffer( pbufferHostIndex, ddiskHostIndex, segments, - childSpan); + std::move(childSpan)); DDiskConnections[ddiskHostIndex].GetFuture().Subscribe(std::move(cb)); return flushFuture; |
