Skip to content

Commit

Permalink
change once to always
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaqizho committed May 18, 2022
1 parent 4bd1f17 commit 512d349
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dbms/src/Common/FailPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ std::unordered_map<String, std::shared_ptr<FailPointChannel>> FailPointHelper::f
M(exception_when_read_from_log) \
M(exception_mpp_hash_build) \
M(exception_before_drop_segment) \
M(exception_after_drop_segment) \
M(force_change_all_blobs_to_read_only_once)
M(exception_after_drop_segment)

#define APPLY_FOR_FAILPOINTS(M) \
M(force_set_page_file_write_errno) \
Expand All @@ -83,7 +82,8 @@ std::unordered_map<String, std::shared_ptr<FailPointChannel>> FailPointHelper::f
M(force_no_local_region_for_mpp_task) \
M(force_remote_read_for_batch_cop) \
M(force_context_path) \
M(force_slow_page_storage_snapshot_release)
M(force_slow_page_storage_snapshot_release) \
M(force_change_all_blobs_to_read_only)

#define APPLY_FOR_FAILPOINTS_ONCE_WITH_CHANNEL(M) \
M(pause_with_alter_locks_acquired) \
Expand Down
6 changes: 3 additions & 3 deletions dbms/src/Storages/Page/V3/BlobStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extern const int CHECKSUM_DOESNT_MATCH;

namespace FailPoints
{
extern const char force_change_all_blobs_to_read_only_once[];
extern const char force_change_all_blobs_to_read_only[];
} // namespace FailPoints

namespace PS::V3
Expand Down Expand Up @@ -876,7 +876,7 @@ std::vector<BlobFileId> BlobStore::getGCStats()
std::vector<BlobFileId> blob_need_gc;
BlobStoreGCInfo blobstore_gc_info;

fiu_do_on(FailPoints::force_change_all_blobs_to_read_only_once,
fiu_do_on(FailPoints::force_change_all_blobs_to_read_only,
{
for (const auto & [path, stats] : stats_list)
{
Expand All @@ -886,7 +886,7 @@ std::vector<BlobFileId> BlobStore::getGCStats()
stat->changeToReadOnly();
}
}
LOG_FMT_WARNING(log, "enabled force_change_all_blobs_to_read_only_once. All of BlobStat turn to READ-ONLY");
LOG_FMT_WARNING(log, "enabled force_change_all_blobs_to_read_only. All of BlobStat turn to READ-ONLY");
});

for (const auto & [path, stats] : stats_list)
Expand Down

0 comments on commit 512d349

Please sign in to comment.