fix gtest with MemoryWriteBuffer, do not mute exception in ReplicatedMergeMutateTaskBase

This commit is contained in:
Sema Checherinda 2023-06-19 00:10:42 +02:00
parent 2bbfa279ec
commit e3f892f84a
3 changed files with 5 additions and 2 deletions

View File

@ -223,6 +223,7 @@ TEST(MemoryWriteBuffer, WriteAndReread)
{
MemoryWriteBuffer buf(s - 1);
EXPECT_THROW(buf.write(data.data(), data.size()), MemoryWriteBuffer::CurrentBufferExhausted);
buf.finalize();
}
}

View File

@ -295,7 +295,7 @@ void MergeTreeBackgroundExecutor<Queue>::routine(TaskRuntimeDataPtr item)
{
ALLOW_ALLOCATIONS_IN_SCOPE;
/// An exception context is needed to proper delete write buffers without finalization
throw Exception(ErrorCodes::ABORTED, "Storage is about to be deleted. Done task as if it was aborted.");
throw Exception(ErrorCodes::ABORTED, "Storage is about to be deleted. Done active task as if it was aborted.");
}
catch (...)
{

View File

@ -119,9 +119,11 @@ bool ReplicatedMergeMutateTaskBase::executeStep()
}
}
}
}
if (saved_exception)
std::rethrow_exception(saved_exception);
return false;
}