未验证 提交 58854af6 编写于 作者: G Gao Hongtao 提交者: GitHub

Fix slash root issues in es7 client (#6707)

Signed-off-by: NGao Hongtao <hanahmily@gmail.com>
上级 b6620f59
...@@ -74,7 +74,7 @@ Release Notes. ...@@ -74,7 +74,7 @@ Release Notes.
* Make the flushing metrics operation concurrent. * Make the flushing metrics operation concurrent.
* Fix ALS K8SServiceRegistry didn't remove the correct entry. * Fix ALS K8SServiceRegistry didn't remove the correct entry.
* Using "service.istio.io/canonical-name" to replace "app" label to resolve Envoy ALS service name. * Using "service.istio.io/canonical-name" to replace "app" label to resolve Envoy ALS service name.
* Append the root slash(/) to getIndex and getTemplate requests in ES client. * Append the root slash(/) to getIndex and getTemplate requests in ES(6 and 7) client.
* Fix `disable` statement not working. This bug exists since 8.0.0. * Fix `disable` statement not working. This bug exists since 8.0.0.
* Remove the useless metric in `vm.yaml`. * Remove the useless metric in `vm.yaml`.
......
...@@ -175,7 +175,7 @@ public class ElasticSearch7Client extends ElasticSearchClient { ...@@ -175,7 +175,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
indexName = formatIndexName(indexName); indexName = formatIndexName(indexName);
try { try {
Response response = client.getLowLevelClient() Response response = client.getLowLevelClient()
.performRequest(new Request(HttpGet.METHOD_NAME, indexName)); .performRequest(new Request(HttpGet.METHOD_NAME, "/" + indexName));
int statusCode = response.getStatusLine().getStatusCode(); int statusCode = response.getStatusLine().getStatusCode();
if (statusCode != HttpStatus.SC_OK) { if (statusCode != HttpStatus.SC_OK) {
healthChecker.health(); healthChecker.health();
...@@ -218,7 +218,7 @@ public class ElasticSearch7Client extends ElasticSearchClient { ...@@ -218,7 +218,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
name = formatIndexName(name); name = formatIndexName(name);
try { try {
Response response = client.getLowLevelClient() Response response = client.getLowLevelClient()
.performRequest(new Request(HttpGet.METHOD_NAME, "_template/" + name)); .performRequest(new Request(HttpGet.METHOD_NAME, "/_template/" + name));
int statusCode = response.getStatusLine().getStatusCode(); int statusCode = response.getStatusLine().getStatusCode();
if (statusCode != HttpStatus.SC_OK) { if (statusCode != HttpStatus.SC_OK) {
healthChecker.health(); healthChecker.health();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册