Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some fail cases when enable TASN #5086

Merged
merged 6 commits into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dbms/src/Storages/DeltaMerge/StoragePool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ PageId StoragePool::newDataPageIdForDTFile(StableDiskDelegator & delegator, cons

auto existed_path = delegator.getDTFilePath(dtfile_id, /*throw_on_not_exist=*/false);
fiu_do_on(FailPoints::force_set_dtfile_exist_when_acquire_id, {
std::lock_guard lock_for_fail_point(mutex_for_fail_point);
jiaqizho marked this conversation as resolved.
Show resolved Hide resolved
static size_t fail_point_called = 0;
if (existed_path.empty() && fail_point_called % 10 == 0)
{
Expand Down
1 change: 1 addition & 0 deletions dbms/src/Storages/DeltaMerge/StoragePool.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ class StoragePool : private boost::noncopyable
std::atomic<Timepoint> last_try_gc_time = Clock::now();

std::mutex mutex;
std::mutex mutex_for_fail_point;

Context & global_context;

Expand Down