diff --git a/cloud/blockstore/libs/service/unaligned_device_handler.cpp b/cloud/blockstore/libs/service/unaligned_device_handler.cpp index 7846d5a88ae..ab982c15cac 100644 --- a/cloud/blockstore/libs/service/unaligned_device_handler.cpp +++ b/cloud/blockstore/libs/service/unaligned_device_handler.cpp @@ -481,6 +481,14 @@ TUnalignedDeviceHandler::TUnalignedDeviceHandler( , MaxUnalignedBlockCount(maxUnalignedRequestSize / BlockSize) {} +TUnalignedDeviceHandler::~TUnalignedDeviceHandler() +{ + with_lock (RequestsLock) { + AlignedRequests.clear(); + UnalignedRequests.clear(); + } +} + TFuture TUnalignedDeviceHandler::Read( TCallContextPtr ctx, ui64 from, diff --git a/cloud/blockstore/libs/service/unaligned_device_handler.h b/cloud/blockstore/libs/service/unaligned_device_handler.h index 8e7fca365a8..f06c86943c5 100644 --- a/cloud/blockstore/libs/service/unaligned_device_handler.h +++ b/cloud/blockstore/libs/service/unaligned_device_handler.h @@ -48,6 +48,8 @@ class TUnalignedDeviceHandler final ui32 maxSubRequestSize, ui32 maxUnalignedRequestSize); + ~TUnalignedDeviceHandler() override; + NThreading::TFuture Read( TCallContextPtr ctx, ui64 from, diff --git a/cloud/blockstore/libs/vhost/server_ut.cpp b/cloud/blockstore/libs/vhost/server_ut.cpp index 9e9cd5addfc..253e2f0dd3d 100644 --- a/cloud/blockstore/libs/vhost/server_ut.cpp +++ b/cloud/blockstore/libs/vhost/server_ut.cpp @@ -7,7 +7,6 @@ #include #include #include - #include #include #include @@ -17,6 +16,7 @@ #include #include #include +#include #include #include @@ -560,7 +560,8 @@ Y_UNIT_TEST_SUITE(TServerTest) Y_UNIT_TEST(ShouldCancelRequestsInFlightWhenStopEndpointOrStopServer) { - TString unixSocketPath = CreateGuidAsString() + ".sock"; + TString unixSocketPath = + MakeTempName(nullptr, CreateGuidAsString().c_str(), "sock"); const ui32 blockSize = 4096; const ui64 startIndex = 3; const ui64 blocksCount = 41;