diff options
| author | Kirill Pleshivtsev <[email protected]> | 2026-07-20 22:32:43 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-07-20 15:32:43 +0000 |
| commit | 3bc4775382dc600fb97d7c8cb457dc7474eeb172 (patch) | |
| tree | aa9e26d5d14c5744217749ffcffff08020f8adfe | |
| parent | 295adcd3215994be2422763b792216fb3f2422e5 (diff) | |
Fix crash on nullptr-span dereference (#47183)
| -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; |
