elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.57k stars 24.62k forks source link

FullClusterRestartIT#testSnapshotRestore failure #38603

Closed martijnvg closed 5 years ago

martijnvg commented 5 years ago

Actual failure:

 Throwable #1: org.elasticsearch.client.ResponseException: method [PUT], host [http://[::1]:33469], URI [/_template/test_template?include_type_name=true], status line [HTTP/1.1 400 Bad Request]
   > Warnings: [[types removal] Specifying include_type_name in put index template requests is deprecated. The parameter will be removed in the next major version

In the FullClusterRestartIT#testSnapshotRestore test, against a 7.0.0 node, the type of a index template is no longer included in the put index api's request body. Also include_type_name appears to be set, but the put index template api still fails with the fact that _doc is missing.

  1> [2019-02-08T10:01:24,279][INFO ][o.e.u.FullClusterRestartIT] [testSnapshotRestore] before test
  1> [2019-02-08T10:01:24,458][INFO ][o.e.u.FullClusterRestartIT] [testSnapshotRestore] initializing REST clients against [http://[::1]:33469, http://[::1]:40831]
  1> [2019-02-08T10:01:25,030][WARN ][o.e.c.RestClient         ] [testSnapshotRestore] request [GET http://[::1]:33469/info/doc/testsnapshotrestore_count?filter_path=_source] returned 1 warnings: [299 Elasticsearch-7.1.0-SNAPSHOT-Unknown "[types removal] Specifying types in document get requests is deprecated, use the /{index}/_doc/{id} endpoint instead."]
  1> [2019-02-08T10:01:25,196][WARN ][o.e.c.RestClient         ] [testSnapshotRestore] request [PUT http://[::1]:33469/_template/test_template?include_type_name=true] returned 1 warnings: [299 Elasticsearch-7.1.0-SNAPSHOT-Unknown "[types removal] Specifying include_type_name in put index template requests is deprecated. The parameter will be removed in the next major version."]
  1> [2019-02-08T10:01:25,260][INFO ][o.e.u.FullClusterRestartIT] [testSnapshotRestore] after test
  2> REPRODUCE WITH: ./gradlew :qa:full-cluster-restart:v6.6.1#upgradedClusterTestRunner -Dtests.seed=ACCA8891B511EDB8 -Dtests.class=org.elasticsearch.upgrades.FullClusterRestartIT -Dtests.method="testSnapshotRestore" -Dtests.security.manager=true -Dtests.locale=pt -Dtests.timezone=America/Danmarkshavn -Dcompiler.java=11 -Druntime.java=8
ERROR   1.03s | FullClusterRestartIT.testSnapshotRestore <<< FAILURES!
   > Throwable #1: org.elasticsearch.client.ResponseException: method [PUT], host [http://[::1]:33469], URI [/_template/test_template?include_type_name=true], status line [HTTP/1.1 400 Bad Request]
   > Warnings: [[types removal] Specifying include_type_name in put index template requests is deprecated. The parameter will be removed in the next major version.]
   > {"error":{"root_cause":[{"type":"invalid_type_name_exception","reason":"mapping type name [_source] can't start with '_' unless it is called [_doc]"}],"type":"invalid_type_name_exception","reason":"mapping type name [_source] can't start with '_' unless it is called [_doc]"},"status":400}
   >    at __randomizedtesting.SeedInfo.seed([ACCA8891B511EDB8:93AF62687FACEAC7]:0)
   >    at org.elasticsearch.client.RestClient.convertResponse(RestClient.java:260)
   >    at org.elasticsearch.client.RestClient.performRequest(RestClient.java:238)
   >    at org.elasticsearch.client.RestClient.performRequest(RestClient.java:212)
   >    at org.elasticsearch.upgrades.FullClusterRestartIT.testSnapshotRestore(FullClusterRestartIT.java:918)
   >    at java.lang.Thread.run(Thread.java:748)
  2> NOTE: leaving temporary files on disk at: /home/mvg/dev/projects/elasticsearch/7.x/qa/full-cluster-restart/build/testrun/v6.6.1#upgradedClusterTestRunner/J0/temp/org.elasticsearch.upgrades.FullClusterRestartIT_ACCA8891B511EDB8-001
  2> NOTE: test params are: codec=Asserting(Lucene80): {}, docValues:{}, maxPointsInLeafNode=1610, maxMBSortInHeap=7.0941513110225145, sim=Asserting(org.apache.lucene.search.similarities.AssertingSimilarity@739ed0f6), locale=pt, timezone=America/Danmarkshavn
  2> NOTE: Linux 4.15.0-45-generic amd64/Oracle Corporation 1.8.0_202 (64-bit)/cpus=12,threads=1,free=453279984,total=514850816
  2> NOTE: All tests run in this JVM: [FullClusterRestartIT]
Completed [1/1] in 2.55s, 1 test, 1 error <<< FAILURES!
cbuescher commented 5 years ago

@martijnvg do you think this is fixed by #38604 and can be closed or does this need further investigation?

martijnvg commented 5 years ago

@cbuescher No, that PR did not fix this test failure, it just muted this test. It fixed a helper method that fixed other tests in the FullClusterRestartIT test class. So this test still needs to be fixed.

elasticmachine commented 5 years ago

Pinging @elastic/es-search

cbuescher commented 5 years ago

This seems to be muted only on 7.x (b284fede0b31) so I assume the test runs correctly on 7.0 and/or is fixed otherwise on master.

cbuescher commented 5 years ago

Closed by https://github.com/elastic/elasticsearch/pull/38795