Fix slash root issues in es7 client (#6707)

Signed-off-by: Gao Hongtao <hanahmily@gmail.com>
This commit is contained in:
Gao Hongtao 2021-04-08 11:19:00 +08:00 committed by GitHub
parent b6620f59c9
commit 58854af662
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -74,7 +74,7 @@ Release Notes.
* Make the flushing metrics operation concurrent.
* 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.
* 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.
* Remove the useless metric in `vm.yaml`.

View File

@ -175,7 +175,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
indexName = formatIndexName(indexName);
try {
Response response = client.getLowLevelClient()
.performRequest(new Request(HttpGet.METHOD_NAME, indexName));
.performRequest(new Request(HttpGet.METHOD_NAME, "/" + indexName));
int statusCode = response.getStatusLine().getStatusCode();
if (statusCode != HttpStatus.SC_OK) {
healthChecker.health();
@ -218,7 +218,7 @@ public class ElasticSearch7Client extends ElasticSearchClient {
name = formatIndexName(name);
try {
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();
if (statusCode != HttpStatus.SC_OK) {
healthChecker.health();