Skip to content

Commit

Permalink
remove unnecessary change
Browse files Browse the repository at this point in the history
  • Loading branch information
lidezhu committed Jun 26, 2022
1 parent f8f7206 commit c16bb0a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions dbms/src/Storages/DeltaMerge/Segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1333,9 +1333,7 @@ bool Segment::compactDelta(DMContext & dm_context)
CurrentMetrics::Increment cur_dm_segments{CurrentMetrics::DT_DeltaCompact};
GET_METRIC(tiflash_storage_subtask_count, type_delta_compact).Increment();
Stopwatch watch;
SCOPE_EXIT({
GET_METRIC(tiflash_storage_subtask_duration_seconds, type_delta_compact).Observe(watch.elapsedSeconds());
});
SCOPE_EXIT({ GET_METRIC(tiflash_storage_subtask_duration_seconds, type_delta_compact).Observe(watch.elapsedSeconds()); });

return delta->compact(dm_context);
}
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Storages/StorageDeltaMerge.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class StorageDeltaMerge

void flushCache(const Context & context) override;

bool flushCache(const Context & context, const DM::RowKeyRange & range_to_flush, bool try_until_succeed = true) override;
bool flushCache(const Context & context, const DM::RowKeyRange & range_to_flush, bool try_until_succeed) override;

/// Merge delta into the stable layer for all segments.
///
Expand Down
5 changes: 1 addition & 4 deletions dbms/src/Storages/Transaction/RegionTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,7 @@ void removeObsoleteDataInStorage(
auto rowkey_range
= DM::RowKeyRange::fromRegionRange(handle_range, table_id, table_id, storage->isCommonHandle(), storage->getRowKeyColumnSize());
dm_storage->deleteRange(rowkey_range, context->getSettingsRef());
// flush to disk and keep try until success
while (!dm_storage->flushCache(*context, rowkey_range))
{
}
dm_storage->flushCache(*context, rowkey_range, /*try_until_succeed*/ true); // flush to disk
}
catch (DB::Exception & e)
{
Expand Down

0 comments on commit c16bb0a

Please sign in to comment.