Skip to content

Commit

Permalink
Fix slash root issues in es7 client (apache#6707)
Browse files Browse the repository at this point in the history
Signed-off-by: Gao Hongtao <[email protected]>
  • Loading branch information
hanahmily authored Apr 8, 2021
1 parent b6620f5 commit 58854af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public Map<String, Object> getIndex(String indexName) throws IOException {
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();
Expand Down Expand Up @@ -218,7 +218,7 @@ public Map<String, Object> getTemplate(String name) throws IOException {
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();
Expand Down

0 comments on commit 58854af

Please sign in to comment.