mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
turn off some d-tor finalize
This commit is contained in:
parent
100b4d0969
commit
0e019c8e83
@ -59,6 +59,7 @@ void CompressedWriteBuffer::nextImpl()
|
||||
|
||||
CompressedWriteBuffer::~CompressedWriteBuffer()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ nuraft::ptr<nuraft::buffer> WriteBufferFromNuraftBuffer::getBuffer()
|
||||
|
||||
WriteBufferFromNuraftBuffer::~WriteBufferFromNuraftBuffer()
|
||||
{
|
||||
//!
|
||||
try
|
||||
{
|
||||
finalize();
|
||||
|
@ -123,6 +123,7 @@ void FileSegmentRangeWriter::finalize()
|
||||
|
||||
FileSegmentRangeWriter::~FileSegmentRangeWriter()
|
||||
{
|
||||
//!
|
||||
try
|
||||
{
|
||||
if (!finalized)
|
||||
|
@ -38,6 +38,7 @@ WriteBufferFromAzureBlobStorage::WriteBufferFromAzureBlobStorage(
|
||||
|
||||
WriteBufferFromAzureBlobStorage::~WriteBufferFromAzureBlobStorage()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -16,14 +16,15 @@ WriteBufferWithFinalizeCallback::WriteBufferWithFinalizeCallback(
|
||||
|
||||
WriteBufferWithFinalizeCallback::~WriteBufferWithFinalizeCallback()
|
||||
{
|
||||
try
|
||||
{
|
||||
finalize();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
tryLogCurrentException(__PRETTY_FUNCTION__);
|
||||
}
|
||||
//!
|
||||
// try
|
||||
// {
|
||||
// finalize();
|
||||
// }
|
||||
// catch (...)
|
||||
// {
|
||||
// tryLogCurrentException(__PRETTY_FUNCTION__);
|
||||
// }
|
||||
}
|
||||
|
||||
void WriteBufferWithFinalizeCallback::finalizeImpl()
|
||||
|
@ -115,6 +115,7 @@ public:
|
||||
|
||||
~WriteBufferFromZipArchive() override
|
||||
{
|
||||
//!
|
||||
try
|
||||
{
|
||||
finalize();
|
||||
@ -191,7 +192,11 @@ namespace
|
||||
explicit StreamFromWriteBuffer(std::unique_ptr<WriteBuffer> write_buffer_)
|
||||
: write_buffer(std::move(write_buffer_)), start_offset(write_buffer->count()) {}
|
||||
|
||||
~StreamFromWriteBuffer() { write_buffer->finalize(); }
|
||||
~StreamFromWriteBuffer()
|
||||
{
|
||||
//!
|
||||
write_buffer->finalize();
|
||||
}
|
||||
|
||||
static int closeFileFunc(void *, void * stream)
|
||||
{
|
||||
|
@ -44,6 +44,7 @@ BrotliWriteBuffer::BrotliWriteBuffer(std::unique_ptr<WriteBuffer> out_, int comp
|
||||
|
||||
BrotliWriteBuffer::~BrotliWriteBuffer()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,7 @@ Bzip2WriteBuffer::Bzip2WriteBuffer(std::unique_ptr<WriteBuffer> out_, int compre
|
||||
|
||||
Bzip2WriteBuffer::~Bzip2WriteBuffer()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ void ForkWriteBuffer::finalizeImpl()
|
||||
|
||||
ForkWriteBuffer::~ForkWriteBuffer()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,7 @@ LZMADeflatingWriteBuffer::LZMADeflatingWriteBuffer(
|
||||
|
||||
LZMADeflatingWriteBuffer::~LZMADeflatingWriteBuffer()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@ Lz4DeflatingWriteBuffer::Lz4DeflatingWriteBuffer(
|
||||
|
||||
Lz4DeflatingWriteBuffer::~Lz4DeflatingWriteBuffer()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@ SnappyWriteBuffer::SnappyWriteBuffer(std::unique_ptr<WriteBuffer> out_, size_t b
|
||||
|
||||
SnappyWriteBuffer::~SnappyWriteBuffer()
|
||||
{
|
||||
//!
|
||||
finish();
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ WriteBufferFromEncryptedFile::WriteBufferFromEncryptedFile(
|
||||
|
||||
WriteBufferFromEncryptedFile::~WriteBufferFromEncryptedFile()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -77,6 +77,7 @@ WriteBufferFromFile::~WriteBufferFromFile()
|
||||
if (fd < 0)
|
||||
return;
|
||||
|
||||
//!
|
||||
finalize();
|
||||
int err = ::close(fd);
|
||||
/// Everything except for EBADF should be ignored in dtor, since all of
|
||||
|
@ -30,14 +30,15 @@ void WriteBufferFromFileDecorator::finalizeImpl()
|
||||
|
||||
WriteBufferFromFileDecorator::~WriteBufferFromFileDecorator()
|
||||
{
|
||||
try
|
||||
{
|
||||
finalize();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
tryLogCurrentException(__PRETTY_FUNCTION__);
|
||||
}
|
||||
//!
|
||||
// try
|
||||
// {
|
||||
// finalize();
|
||||
// }
|
||||
// catch (...)
|
||||
// {
|
||||
// tryLogCurrentException(__PRETTY_FUNCTION__);
|
||||
// }
|
||||
|
||||
/// It is not a mistake that swap is called here
|
||||
/// Swap has been called at constructor, it should be called at destructor
|
||||
|
@ -105,6 +105,7 @@ WriteBufferFromFileDescriptor::WriteBufferFromFileDescriptor(
|
||||
|
||||
WriteBufferFromFileDescriptor::~WriteBufferFromFileDescriptor()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@ WriteBufferFromOStream::WriteBufferFromOStream(
|
||||
|
||||
WriteBufferFromOStream::~WriteBufferFromOStream()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -106,6 +106,7 @@ WriteBufferFromPocoSocket::WriteBufferFromPocoSocket(Poco::Net::Socket & socket_
|
||||
|
||||
WriteBufferFromPocoSocket::~WriteBufferFromPocoSocket()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -63,6 +63,7 @@ public:
|
||||
|
||||
~WriteBufferFromVector() override
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -74,6 +74,7 @@ void ZlibDeflatingWriteBuffer::nextImpl()
|
||||
|
||||
ZlibDeflatingWriteBuffer::~ZlibDeflatingWriteBuffer()
|
||||
{
|
||||
//!
|
||||
try
|
||||
{
|
||||
finalize();
|
||||
|
@ -87,6 +87,7 @@ void ZstdDeflatingAppendableWriteBuffer::nextImpl()
|
||||
|
||||
ZstdDeflatingAppendableWriteBuffer::~ZstdDeflatingAppendableWriteBuffer()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,7 @@ ZstdDeflatingWriteBuffer::ZstdDeflatingWriteBuffer(
|
||||
|
||||
ZstdDeflatingWriteBuffer::~ZstdDeflatingWriteBuffer()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,7 @@ std::shared_ptr<ReadBuffer> WriteBufferToFileSegment::getReadBufferImpl()
|
||||
|
||||
WriteBufferToFileSegment::~WriteBufferToFileSegment()
|
||||
{
|
||||
//!
|
||||
try
|
||||
{
|
||||
finalize();
|
||||
|
@ -184,6 +184,7 @@ struct TemporaryFileStream::OutputWriter
|
||||
|
||||
~OutputWriter()
|
||||
{
|
||||
//!
|
||||
try
|
||||
{
|
||||
finalize();
|
||||
|
@ -171,6 +171,7 @@ void WriteBufferFromHTTPServerResponse::onProgress(const Progress & progress)
|
||||
|
||||
WriteBufferFromHTTPServerResponse::~WriteBufferFromHTTPServerResponse()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
@ -147,6 +147,7 @@ void WriteBufferFromHDFS::finalizeImpl()
|
||||
|
||||
WriteBufferFromHDFS::~WriteBufferFromHDFS()
|
||||
{
|
||||
//!
|
||||
finalize();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user