Skip to content

Commit

Permalink
fix gtest with MemoryWriteBuffer, do not mute exception in Replicated…
Browse files Browse the repository at this point in the history
…MergeMutateTaskBase
  • Loading branch information
CheSema committed Jun 18, 2023
1 parent 2bbfa27 commit e3f892f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Disks/tests/gtest_cascade_and_memory_write_buffer.cpp
Expand Up @@ -223,6 +223,7 @@ TEST(MemoryWriteBuffer, WriteAndReread)
{
MemoryWriteBuffer buf(s - 1);
EXPECT_THROW(buf.write(data.data(), data.size()), MemoryWriteBuffer::CurrentBufferExhausted);
buf.finalize();
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Storages/MergeTree/MergeTreeBackgroundExecutor.cpp
Expand Up @@ -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 (...)
{
Expand Down
4 changes: 3 additions & 1 deletion src/Storages/MergeTree/ReplicatedMergeMutateTaskBase.cpp
Expand Up @@ -119,9 +119,11 @@ bool ReplicatedMergeMutateTaskBase::executeStep()
}
}
}

}

if (saved_exception)
std::rethrow_exception(saved_exception);

return false;
}

Expand Down

0 comments on commit e3f892f

Please sign in to comment.