From 75143183c04adbad114f1a772e0e3d47c5ec7f62 Mon Sep 17 00:00:00 2001 From: JaySon Date: Tue, 24 Mar 2026 08:42:42 +0800 Subject: [PATCH 1/2] This is an automated cherry-pick of #10764 Signed-off-by: ti-chi-bot --- dbms/src/Common/TiFlashMetrics.cpp | 38 ++ dbms/src/Common/TiFlashMetrics.h | 11 + dbms/src/Interpreters/Settings.h | 1 + dbms/src/Storages/KVStore/TMTContext.cpp | 1 + dbms/src/Storages/S3/S3GCManager.cpp | 75 +++- dbms/src/Storages/S3/S3GCManager.h | 6 + metrics/grafana/tiflash_summary.json | 507 +++++++++++++++++++++-- 7 files changed, 601 insertions(+), 38 deletions(-) diff --git a/dbms/src/Common/TiFlashMetrics.cpp b/dbms/src/Common/TiFlashMetrics.cpp index 62c954c697d..4b8a30e3ebf 100644 --- a/dbms/src/Common/TiFlashMetrics.cpp +++ b/dbms/src/Common/TiFlashMetrics.cpp @@ -73,6 +73,11 @@ TiFlashMetrics::TiFlashMetrics() .Name("tiflash_storage_ru_read_bytes") .Help("Read bytes for storage RU calculation") .Register(*registry); + + registered_s3_store_summary_bytes_family = &prometheus::BuildGauge() + .Name("tiflash_storage_s3_store_summary_bytes") + .Help("S3 storage summary bytes by store and file type") + .Register(*registry); } void TiFlashMetrics::addReplicaSyncRU(UInt32 keyspace_id, UInt64 ru) @@ -249,4 +254,37 @@ prometheus::Counter & TiFlashMetrics::getStorageRUReadBytesCounter( return counter; } } + +void TiFlashMetrics::setS3StoreSummaryBytes(UInt64 store_id, UInt64 data_file_bytes, UInt64 dt_file_bytes) +{ + // Fast path. + { + std::shared_lock lock(s3_store_summary_bytes_mtx); + auto it = registered_s3_store_summary_bytes_metrics.find(store_id); + if (it != registered_s3_store_summary_bytes_metrics.end()) + { + it->second.data_file_bytes->Set(data_file_bytes); + it->second.dt_file_bytes->Set(dt_file_bytes); + return; + } + } + + std::unique_lock lock(s3_store_summary_bytes_mtx); + auto [it, inserted] = registered_s3_store_summary_bytes_metrics.try_emplace(store_id); + if (inserted) + { + auto store_id_str = std::to_string(store_id); + auto & data_file_bytes_metric + = registered_s3_store_summary_bytes_family->Add({{"store_id", store_id_str}, {"type", "data_file_bytes"}}); + auto & dt_file_bytes_metric + = registered_s3_store_summary_bytes_family->Add({{"store_id", store_id_str}, {"type", "dt_file_bytes"}}); + it->second = S3StoreSummaryBytesMetrics{ + .data_file_bytes = &data_file_bytes_metric, + .dt_file_bytes = &dt_file_bytes_metric, + }; + } + + it->second.data_file_bytes->Set(data_file_bytes); + it->second.dt_file_bytes->Set(dt_file_bytes); +} } // namespace DB diff --git a/dbms/src/Common/TiFlashMetrics.h b/dbms/src/Common/TiFlashMetrics.h index fbfaf903c28..9f3cbbc72ef 100644 --- a/dbms/src/Common/TiFlashMetrics.h +++ b/dbms/src/Common/TiFlashMetrics.h @@ -1325,6 +1325,8 @@ class TiFlashMetrics const String & resource_group, const DM::ReadRUType type); + void setS3StoreSummaryBytes(UInt64 store_id, UInt64 data_file_bytes, UInt64 dt_file_bytes); + private: TiFlashMetrics(); @@ -1366,6 +1368,15 @@ class TiFlashMetrics // {keyspace}_{resource_group}_{type} -> Counter std::unordered_map registered_storage_ru_read_bytes_metrics; + struct S3StoreSummaryBytesMetrics + { + prometheus::Gauge * data_file_bytes; + prometheus::Gauge * dt_file_bytes; + }; + prometheus::Family * registered_s3_store_summary_bytes_family; + std::shared_mutex s3_store_summary_bytes_mtx; + std::unordered_map registered_s3_store_summary_bytes_metrics; + public: #define MAKE_METRIC_MEMBER_M(family_name, help, type, ...) \ MetricFamily family_name \ diff --git a/dbms/src/Interpreters/Settings.h b/dbms/src/Interpreters/Settings.h index 71f8fe82b3a..4bdf83ae6df 100644 --- a/dbms/src/Interpreters/Settings.h +++ b/dbms/src/Interpreters/Settings.h @@ -238,6 +238,7 @@ struct Settings M(SettingBool, remote_checkpoint_only_upload_manifest, true, "Only upload manifest data when uploading checkpoint") \ M(SettingInt64, remote_gc_method, 1, "The method of running GC task on the remote store. 1 - lifecycle, 2 - scan.") \ M(SettingInt64, remote_gc_interval_seconds, 3600, "The interval of running GC task on the remote store. Unit is second.") \ + M(SettingInt64, remote_summary_interval_seconds, 0, "The interval of collecting remote S3 storage summary. Unit is second. <=0 disables periodic summary task.") \ M(SettingInt64, remote_gc_verify_consistency, 0, "[testing] Verify the consistenct of valid locks when doing GC") \ M(SettingInt64, remote_gc_min_age_seconds, 3600, "The file will NOT be compacted when the time difference between the last modification is less than this threshold") \ M(SettingDouble, remote_gc_ratio, 0.5, "The files with valid rate less than this threshold will be compacted") \ diff --git a/dbms/src/Storages/KVStore/TMTContext.cpp b/dbms/src/Storages/KVStore/TMTContext.cpp index 63e86e00d42..cb43289731f 100644 --- a/dbms/src/Storages/KVStore/TMTContext.cpp +++ b/dbms/src/Storages/KVStore/TMTContext.cpp @@ -222,6 +222,7 @@ void TMTContext::initS3GCManager(const TiFlashRaftProxyHelper * proxy_helper) } // TODO: make it reloadable remote_gc_config.interval_seconds = context.getSettingsRef().remote_gc_interval_seconds; + remote_gc_config.summary_interval_seconds = context.getSettingsRef().remote_summary_interval_seconds; remote_gc_config.verify_locks = context.getSettingsRef().remote_gc_verify_consistency > 0; // set the gc_method so that S3LockService can set tagging when create delmark S3::ClientFactory::instance().gc_method = remote_gc_config.method; diff --git a/dbms/src/Storages/S3/S3GCManager.cpp b/dbms/src/Storages/S3/S3GCManager.cpp index b67ee7246c8..bbdc929a0f2 100644 --- a/dbms/src/Storages/S3/S3GCManager.cpp +++ b/dbms/src/Storages/S3/S3GCManager.cpp @@ -218,7 +218,16 @@ bool S3GCManager::runOnAllStores() return false; } +<<<<<<< HEAD void S3GCManager::runForStore(UInt64 gc_store_id) +======= +bool S3GCManager::isOwner() const +{ + return gc_owner_manager->isOwner(); +} + +void S3GCManager::runForStore(UInt64 gc_store_id, LoggerPtr slogger) +>>>>>>> 943351404a (disagg: Add O11y on object store usage summary of each tiflash store (#10764)) { // get a timepoint at the begin, only remove objects that expired compare // to this timepoint @@ -824,6 +833,17 @@ S3StoreStorageSummary S3GCManager::getStoreStorageSummary(StoreID store_id) String last_dtfile_key; size_t num_dtfile_keys_for_last_dtfile = 0; S3::listPrefix(*client, prefix, [&](const Aws::S3::Model::Object & object) { + if (shutdown_called) + { + LOG_INFO( + log, + "getS3StorageSummary shutting down, break, store_id={} processed_keys={}", + store_id, + num_processed_keys); + // .more=false to break the listing early + return PageResult{.num_keys = 1, .more = false}; + } + const auto & key = object.GetKey(); const auto view = S3FilenameView::fromKey(key); if (watch.elapsedSeconds() - last_elapsed > log_interval_seconds) @@ -897,6 +917,7 @@ S3StoreStorageSummary S3GCManager::getStoreStorageSummary(StoreID store_id) return PageResult{.num_keys = 1, .more = true}; }); summary.num_keys = num_processed_keys; + TiFlashMetrics::instance().setS3StoreSummaryBytes(store_id, summary.data_file.bytes, summary.dt_file.bytes); LOG_INFO(log, "getS3StorageSummary finish, elapsed={:.3f}s summary={}", watch.elapsedSeconds(), summary); return summary; } @@ -922,6 +943,49 @@ S3GCManagerService::S3GCManagerService( [this]() { return manager->runOnAllStores(); }, false, /*interval_ms*/ config.interval_seconds * 1000); + + if (config.summary_interval_seconds <= 0) + { + LOG_INFO( + Logger::get("S3GCManagerService"), + "The periodic S3 storage summary will be disabled, summary_interval_seconds={}", + config.summary_interval_seconds); + } + else + { + if (config.summary_interval_seconds < 12 * 3600) + { + LOG_WARNING( + Logger::get("S3GCManagerService"), + "The summary_interval_seconds is too small, it may cause high overhead on S3. " + "It is recommended to set it to a value larger than 12 hours (43200 seconds), " + "summary_interval_seconds={}", + config.summary_interval_seconds); + } + + summary_timer = global_ctx.getBackgroundPool().addTask( + [this]() { + // Only run summary in the owner instance + if (!manager || !manager->isOwner()) + return false; + + try + { + auto summary = manager->getS3StorageSummary({}); + LOG_INFO( + Logger::get("S3GCManagerService"), + "Periodic S3 storage summary finished, num_stores={}", + summary.stores.size()); + } + catch (...) + { + tryLogCurrentException(Logger::get("S3GCManagerService"), "periodic getS3StorageSummary failed"); + } + return false; + }, + false, + config.summary_interval_seconds * 1000); + } } S3GCManagerService::~S3GCManagerService() @@ -942,9 +1006,16 @@ void S3GCManagerService::shutdown() // Remove the task handler. It will block until the task break global_ctx.getBackgroundPool().removeTask(timer); timer = nullptr; - // then we can reset the manager - manager = nullptr; } + + if (summary_timer) + { + global_ctx.getBackgroundPool().removeTask(summary_timer); + summary_timer = nullptr; + } + + // then we can reset the manager + manager = nullptr; } void S3GCManagerService::wake() const diff --git a/dbms/src/Storages/S3/S3GCManager.h b/dbms/src/Storages/S3/S3GCManager.h index 7191aaa7efd..f542d286f26 100644 --- a/dbms/src/Storages/S3/S3GCManager.h +++ b/dbms/src/Storages/S3/S3GCManager.h @@ -71,6 +71,9 @@ struct S3GCConfig // The interval of the S3 GC routine runs Int64 interval_seconds = 600; + // The interval of periodic S3 storage summary task. + Int64 summary_interval_seconds = 24 * 60 * 60; + // The maximum number of manifest files preserve // for each store size_t manifest_preserve_count = 10; @@ -143,6 +146,8 @@ class S3GCManager bool runOnAllStores(); + bool isOwner() const; + void shutdown() { shutdown_called = true; } S3StoreStorageSummary getStoreStorageSummary(StoreID store_id); @@ -222,6 +227,7 @@ class S3GCManagerService Context & global_ctx; std::unique_ptr manager; BackgroundProcessingPool::TaskHandle timer; + BackgroundProcessingPool::TaskHandle summary_timer; }; } // namespace DB::S3 diff --git a/metrics/grafana/tiflash_summary.json b/metrics/grafana/tiflash_summary.json index 40d3c22f52f..402ef82a129 100644 --- a/metrics/grafana/tiflash_summary.json +++ b/metrics/grafana/tiflash_summary.json @@ -52,7 +52,7 @@ "gnetId": null, "graphTooltip": 1, "id": null, - "iteration": 1766901450632, + "iteration": 1774097820692, "links": [], "panels": [ { @@ -1068,6 +1068,117 @@ "align": false, "alignLevel": null } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_TEST-CLUSTER}", + "decimals": 1, + "description": "", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 25 + }, + "hiddenSeries": false, + "id": 366, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": false + }, + "percentage": false, + "pluginVersion": "7.5.11", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(tiflash_storage_s3_store_summary_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", instance=~\"$tiflash_role\"}) by (instance, store_id,type)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "store-{{store_id}}-{{type}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Remote Store Summary (Disagg arch)", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "repeat": null, @@ -11979,7 +12090,7 @@ "h": 8, "w": 12, "x": 0, - "y": 43 + "y": 11 }, "hiddenSeries": false, "id": 128, @@ -12122,7 +12233,7 @@ "h": 8, "w": 12, "x": 12, - "y": 43 + "y": 11 }, "hiddenSeries": false, "id": 129, @@ -12239,7 +12350,7 @@ "h": 8, "w": 12, "x": 0, - "y": 51 + "y": 19 }, "heatmap": {}, "hideZeroBuckets": true, @@ -12301,7 +12412,7 @@ "h": 8, "w": 12, "x": 12, - "y": 51 + "y": 19 }, "hiddenSeries": false, "id": 158, @@ -12437,7 +12548,7 @@ "h": 8, "w": 12, "x": 0, - "y": 59 + "y": 27 }, "hiddenSeries": false, "id": 163, @@ -12542,7 +12653,7 @@ "h": 8, "w": 12, "x": 12, - "y": 59 + "y": 27 }, "hiddenSeries": false, "id": 162, @@ -12662,7 +12773,7 @@ "h": 8, "w": 12, "x": 0, - "y": 67 + "y": 35 }, "hiddenSeries": false, "id": 164, @@ -12778,7 +12889,7 @@ "h": 8, "w": 12, "x": 12, - "y": 67 + "y": 35 }, "hiddenSeries": false, "id": 231, @@ -12885,7 +12996,7 @@ "h": 8, "w": 12, "x": 0, - "y": 75 + "y": 43 }, "height": "", "hiddenSeries": false, @@ -12998,7 +13109,7 @@ "h": 8, "w": 12, "x": 12, - "y": 75 + "y": 43 }, "hiddenSeries": false, "id": 123, @@ -13129,7 +13240,7 @@ "h": 9, "w": 24, "x": 0, - "y": 83 + "y": 51 }, "hiddenSeries": false, "id": 232, @@ -13236,7 +13347,7 @@ "h": 9, "w": 24, "x": 0, - "y": 92 + "y": 60 }, "hiddenSeries": false, "id": 345, @@ -13358,7 +13469,7 @@ "h": 8, "w": 12, "x": 0, - "y": 44 + "y": 12 }, "hiddenSeries": false, "id": 84, @@ -13463,7 +13574,7 @@ "h": 8, "w": 12, "x": 12, - "y": 44 + "y": 12 }, "hiddenSeries": false, "id": 305, @@ -13569,7 +13680,7 @@ "h": 8, "w": 12, "x": 0, - "y": 52 + "y": 20 }, "hiddenSeries": false, "id": 266, @@ -13601,7 +13712,7 @@ "renderer": "flot", "seriesOverrides": [ { - "alias": "/-/", + "alias": "", "yaxis": 2 } ], @@ -13624,7 +13735,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "I/O Limiter Pending Rate and Duration", + "title": "I/O Limiter Pending Rate", "tooltip": { "shared": true, "sort": 0, @@ -13679,7 +13790,7 @@ "h": 8, "w": 12, "x": 12, - "y": 52 + "y": 20 }, "hiddenSeries": false, "id": 86, @@ -18068,7 +18179,7 @@ "h": 8, "w": 12, "x": 0, - "y": 17 + "y": 25 }, "hiddenSeries": false, "id": 187, @@ -18188,7 +18299,7 @@ "h": 8, "w": 12, "x": 12, - "y": 17 + "y": 25 }, "height": "", "hiddenSeries": false, @@ -18307,7 +18418,7 @@ "h": 8, "w": 12, "x": 0, - "y": 25 + "y": 33 }, "height": "", "hiddenSeries": false, @@ -18417,7 +18528,7 @@ "h": 8, "w": 12, "x": 12, - "y": 25 + "y": 33 }, "height": "", "hiddenSeries": false, @@ -18530,7 +18641,7 @@ "h": 8, "w": 12, "x": 0, - "y": 33 + "y": 41 }, "hiddenSeries": false, "id": 176, @@ -18638,7 +18749,7 @@ "h": 8, "w": 12, "x": 12, - "y": 33 + "y": 41 }, "hiddenSeries": false, "id": 175, @@ -18765,7 +18876,7 @@ "h": 8, "w": 12, "x": 0, - "y": 41 + "y": 49 }, "hiddenSeries": false, "id": 189, @@ -18867,7 +18978,7 @@ "h": 8, "w": 12, "x": 12, - "y": 41 + "y": 49 }, "hiddenSeries": false, "id": 191, @@ -18957,17 +19068,128 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_TEST-CLUSTER}", + "decimals": 1, + "description": "", + "editable": true, + "error": false, "fieldConfig": { "defaults": {}, "overrides": [] }, "fill": 0, "fillGradient": 0, + "grid": {}, "gridPos": { "h": 8, - "w": 12, + "w": 8, "x": 0, - "y": 49 + "y": 57 + }, + "hiddenSeries": false, + "id": 365, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": false + }, + "percentage": false, + "pluginVersion": "7.5.11", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(tiflash_storage_s3_store_summary_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", instance=~\"$tiflash_role\"}) by (instance, store_id,type)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "store-{{store_id}}-{{type}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Remote Store Summary", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_TEST-CLUSTER}", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 9, + "x": 8, + "y": 57 }, "hiddenSeries": false, "id": 193, @@ -19092,9 +19314,9 @@ "grid": {}, "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 49 + "w": 7, + "x": 17, + "y": 57 }, "hiddenSeries": false, "id": 195, @@ -19190,18 +19412,231 @@ "dashLength": 10, "dashes": false, "datasource": "${DS_TEST-CLUSTER}", + "decimals": 1, "description": "", + "editable": true, + "error": false, "fieldConfig": { "defaults": {}, "overrides": [] }, "fill": 0, "fillGradient": 0, + "grid": {}, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 57 + "y": 65 + }, + "hiddenSeries": false, + "id": 363, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": false + }, + "percentage": false, + "pluginVersion": "7.5.11", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(tiflash_storage_s3_lock_mgr_status{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", instance=~\"$tiflash_role\"}) by (instance,type)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{instance}}-{{type}}", + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Local Lock Manager status", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_TEST-CLUSTER}", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 65 + }, + "hiddenSeries": false, + "id": 364, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": false, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.11", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(rate(tiflash_storage_s3_lock_mgr_counter{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\", instance=~\"$tiflash_role\"}[1m])) by (type, $additional_groupby)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{type}} {{$additional_groupby}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Local Lock Manager QPS", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_TEST-CLUSTER}", + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 73 }, "hiddenSeries": false, "id": 251, @@ -19308,7 +19743,7 @@ "h": 8, "w": 12, "x": 12, - "y": 57 + "y": 73 }, "hiddenSeries": false, "id": 252, @@ -19415,7 +19850,7 @@ "h": 8, "w": 12, "x": 0, - "y": 65 + "y": 81 }, "hiddenSeries": false, "id": 254, @@ -19522,7 +19957,7 @@ "h": 8, "w": 12, "x": 12, - "y": 65 + "y": 81 }, "hiddenSeries": false, "id": 253, From bf239e7c08f8ef9c687d21266331fa6add896c38 Mon Sep 17 00:00:00 2001 From: JaySon-Huang Date: Tue, 24 Mar 2026 23:31:12 +0800 Subject: [PATCH 2/2] Try resolve conflict Signed-off-by: JaySon-Huang --- dbms/src/Storages/S3/S3GCManager.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dbms/src/Storages/S3/S3GCManager.cpp b/dbms/src/Storages/S3/S3GCManager.cpp index bbdc929a0f2..7da3b88d708 100644 --- a/dbms/src/Storages/S3/S3GCManager.cpp +++ b/dbms/src/Storages/S3/S3GCManager.cpp @@ -218,16 +218,12 @@ bool S3GCManager::runOnAllStores() return false; } -<<<<<<< HEAD -void S3GCManager::runForStore(UInt64 gc_store_id) -======= bool S3GCManager::isOwner() const { return gc_owner_manager->isOwner(); } -void S3GCManager::runForStore(UInt64 gc_store_id, LoggerPtr slogger) ->>>>>>> 943351404a (disagg: Add O11y on object store usage summary of each tiflash store (#10764)) +void S3GCManager::runForStore(UInt64 gc_store_id) { // get a timepoint at the begin, only remove objects that expired compare // to this timepoint