OpenSearch/x-pack
Tanguy Leroux e848388865
Fix SourceOnlySnapshotIT (#37461)
The SourceOnlySnapshotIT class tests a source only repository
using the following scenario:
    starts a master node
    starts a data node
    creates a source only repository
    creates an index with documents
    snapshots the index to the source only repository
    deletes the index
    stops the data node
    starts a new data node
    restores the index

Thanks to ESIntegTestCase the index is sometimes created using a custom 
data path. With such a setting, when a shard is assigned to one of the data 
node of the cluster the shard path is resolved using the index custom data 
path and the node's lock id by the NodeEnvironment#resolveCustomLocation().

It should work nicely but in SourceOnlySnapshotIT.snashotAndRestore(), b
efore the change in this PR, the last data node was restarted using a different 
path.home. At startup time this node was assigned a node lock based on other 
locks in the data directory of this temporary path.home which is empty. So it 
always got the 0 lock id. And when this new data node is assigned a shard for
 the index and resolves it against the index custom data path, it also uses the 
node lock id 0 which conflicts with another node of the cluster, resulting in 
various errors with the most obvious one being LockObtainFailedException.

This commit removes the temporary home path for the last data node so that it 
uses the same path home as other nodes of the cluster and then got assigned 
a correct node lock id at startup.

Closes #36330
Closes #36276
2019-01-15 15:03:09 +01:00
..
dev-tools Build: Merge xpack checkstyle config into core (#33399) 2018-09-05 09:17:02 -04:00
docs Docs be explicit on how to turn off deprecated auditing (#37316) 2019-01-15 14:29:32 +02:00
license-tools Core: Rework multi date formatter merging (#36447) 2018-12-11 23:47:44 -08:00
plugin Fix SourceOnlySnapshotIT (#37461) 2019-01-15 15:03:09 +01:00
qa Security: remove SSL settings fallback (#36846) 2019-01-14 14:06:22 -07:00
test Upgrade ASM for java 12 compatability (#37385) 2019-01-13 09:33:39 -08:00
transport-client Testing conventions: add support for checking base classes (#36650) 2019-01-08 13:39:03 +02:00
NOTICE.txt Migrate x-pack-elasticsearch source to elasticsearch 2018-04-20 15:29:54 -07:00
README.md Reorganize license files 2018-04-20 15:33:59 -07:00
build.gradle MINOR: Remove some Deadcode in Gradle (#37160) 2019-01-07 09:21:25 +01:00

README.md

Elastic License Functionality

This directory tree contains files subject to the Elastic License. The files subject to the Elastic License are grouped in this directory to clearly separate them from files licensed under the Apache License 2.0.