You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by li...@apache.org on 2022/12/21 11:14:20 UTC
[skywalking] branch master updated: Remove unnecessary additional columns when storage is in logical sharding mode (#10191)
This is an automated email from the ASF dual-hosted git repository.
liuhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 46d3411fe9 Remove unnecessary additional columns when storage is in logical sharding mode (#10191)
46d3411fe9 is described below
commit 46d3411fe96a1158970dfcb1dd1ea0f8f118f72b
Author: mrproliu <74...@qq.com>
AuthorDate: Wed Dec 21 19:14:06 2022 +0800
Remove unnecessary additional columns when storage is in logical sharding mode (#10191)
---
docs/en/changes/changes.md | 1 +
.../server/storage/plugin/elasticsearch/base/IndexController.java | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index 6aa2ae067d..34d24bdf6e 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -54,6 +54,7 @@
* Add Istio 1.16 to test matrix.
* Register ValueColumn as Tag for Record in BanyanDB storage plugin.
* Bump up Netty to 4.1.86.
+* Remove unnecessary additional columns when storage is in logical sharding mode.
#### UI
diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/IndexController.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/IndexController.java
index 437210ef61..6f1dfdfa12 100644
--- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/IndexController.java
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/IndexController.java
@@ -99,7 +99,8 @@ public enum IndexController {
/**
* There have two cases:
- * 1. When a model is the metric storage mode, a column named {@link LogicIndicesRegister#METRIC_TABLE_NAME} would be
+ * 1. When a model is the metric storage mode and storage is not sharding, or the model is function metrics and storage is sharding,
+ * a column named {@link LogicIndicesRegister#METRIC_TABLE_NAME} would be
* appended to the physical index. The value of the column is the original table name in other storages, such as the
* OAL name.
*
@@ -108,7 +109,7 @@ public enum IndexController {
* The value of the column is the original table name in other storages.
*/
public Map<String, Object> appendTableColumn(Model model, Map<String, Object> columns) {
- if (isMetricModel(model)) {
+ if ((!isLogicSharding() && isMetricModel(model)) || (isLogicSharding() && isFunctionMetric(model))) {
columns.put(LogicIndicesRegister.METRIC_TABLE_NAME, model.getName());
}
if (!logicSharding && isRecordModel(model) && !model.isSuperDataset()) {