From 0af243eaf28471a8c4e1ffcd5f1e9ce0f5c2a8cc Mon Sep 17 00:00:00 2001 From: Andrei Ivanov Date: Wed, 22 Jun 2022 22:07:54 +0300 Subject: [PATCH] Fixed scroll size setting --- pom.xml | 2 +- src/main/java/net/iponweb/disthene/reader/DistheneReader.java | 2 +- .../disthene/reader/graphite/functions/LegendValueFunction.java | 2 +- .../net/iponweb/disthene/reader/service/index/IndexService.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 6c49a474..91a08bfd 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ net.iponweb.disthene.reader disthene-reader jar - 2.0.5 + 2.0.6 disthene-reader http://maven.apache.org diff --git a/src/main/java/net/iponweb/disthene/reader/DistheneReader.java b/src/main/java/net/iponweb/disthene/reader/DistheneReader.java index f87d40c0..c7e4397a 100644 --- a/src/main/java/net/iponweb/disthene/reader/DistheneReader.java +++ b/src/main/java/net/iponweb/disthene/reader/DistheneReader.java @@ -213,7 +213,7 @@ public void handle(Signal signal) { throttlingService.reload(throttlingConfiguration); - logger.debug("Running with the following throttling configuration: " + throttlingConfiguration.toString()); + logger.debug("Running with the following throttling configuration: " + throttlingConfiguration); } catch (Exception e) { logger.error("Reloading throttling configuration failed"); logger.error(e); diff --git a/src/main/java/net/iponweb/disthene/reader/graphite/functions/LegendValueFunction.java b/src/main/java/net/iponweb/disthene/reader/graphite/functions/LegendValueFunction.java index 5928f7b4..7b7ce558 100644 --- a/src/main/java/net/iponweb/disthene/reader/graphite/functions/LegendValueFunction.java +++ b/src/main/java/net/iponweb/disthene/reader/graphite/functions/LegendValueFunction.java @@ -90,7 +90,7 @@ public List evaluate(TargetEvaluator evaluator) throws EvaluationExc } } - ts.setName(ts.getName() + sb.toString()); + ts.setName(ts.getName() + sb); } return processedArguments; diff --git a/src/main/java/net/iponweb/disthene/reader/service/index/IndexService.java b/src/main/java/net/iponweb/disthene/reader/service/index/IndexService.java index a4888893..b8e7ab4b 100644 --- a/src/main/java/net/iponweb/disthene/reader/service/index/IndexService.java +++ b/src/main/java/net/iponweb/disthene/reader/service/index/IndexService.java @@ -70,7 +70,7 @@ private List getPathsFromRegExs(String tenant, List regExs, bool .fetchSource("path", null) .query(queryBuilder); - if (limit < maxResultWindow) sourceBuilder.size(limit); + sourceBuilder.size(Math.min(Math.min(limit, maxResultWindow), indexConfiguration.getScroll())); SearchRequest request = new SearchRequest(indexConfiguration.getIndex()) .source(sourceBuilder)