[TEST] Don't invoke RoutingNodes.assertShardStats() via asserts many times in tests, just once on each reroute call.
Core: switch to fixed thread pool by default for management threads

Switch management threads to a fixed thread pool with up to 5 threads, and queue size of 100 by default, after which excess incoming requests are rejected.

Closes #7318

Closes #7320
Core: DistributorDirectory shouldn't search for directory when reading existing file

This was causing too much work e.g. when pulling node stats or when
opening a new reader, because the least_used distributor would
unnecessarily check free disk space on all path.data entires every
time we try to open a file for reading or check its length.

Closes #7306

Closes #7323
Fix NPE in SnapshotsService on node shutdown

Fixes #6506
Testing doc: describe -Dtests.heap.size and -Dtests.jvm.argline
Test: write heap dump per default

The heap dump is always interesting in case a test causes an OOM.
Per default is is written to target/JX/pidXYZ.hprof
[STORE] Allow to get metadata from arbitrary commit points

Today we always use the latest commit point to return the metadata from
the store. This might cause problems for snapshot and restore since in
contrast to recovery it won't prevent concurrent flushes (lucene commits).
This can lead to all kinds of interesting effects if we are snapshotting
while flushing. This change uses the IndexCommit to open the metadata snapshot
from the store which is consistent with what we snapshot.

Closes #7376
[TEST] filter out keep alive timer thread name
Keep-Alive-Timer is an internal Java thread that might be started, make sure to filter it out
[STORE] Ignore segments.gen on metadata snapshots

The segments.gen file is optional and might even change while we
read it. It's safer to just ignore that file in the snapshot instead.
[STORE] Remove unnecessary deduplication
Add back string op type to IndexRequest
This was removed by accident I think, and it breaks backward comp. on the Java API in minor 1.3 version
closes #7387
[ENGINE] Force optimize was not passed to shard request

The force flag to trigger optimiz calls of a single segment for upgrading
etc. was never passed on to the shard request.

Closes #7404
[TEST] use CFS consistently to not trigger single segment merge without force flag
Context suggester: infinite loop in GeolocationContextMapping

Close #7433
[ENGINE] Wait until engine is started up when acquireing searcher

Today we have a small window where a searcher can be acquired but the
engine is in the state of starting up. This causes a NPE triggering a
shard failure if we are fast enough. This commit fixes this situation
gracefully.

Closes #7455
Parent/child: If _parent field points to a non existing parent type, then skip the has_parent query/filter

Closes #7362
Closes #7349
Parent/child: Add missing support for the field data loading option to the `_parent` field.

Closes #7394
Closes #7402
Test: Backport changes from master to get searchContext
bool query: parser should return match_all in case there are no clauses

This also fixes has_parent filters with a nested empty bool filter
(see test SimpleChildQuerySearchTests#test6722, the test should actually expect
either 0 results when searching for has_parent "test" or one result when
search for has_parent "foo")

closes #7240
closes #7347
Transport Client: fixed the node retry mechanism which could fail without trying all the connected nodes

The RetryListener was notified twice for each single failure, which caused some additional retries, but more importantly was making the client reach the maximum number of retries (number of connected nodes) too quickly, meanwhile ongoing retries which could succeed were not completed yet.

The TransportService used to throw ConnectTransportException due to throwConnectException set to true, and also notify the listener of any exception received from a separate thread through the request holder.

Simplified exception handling by just removing the throwConnectException option from the TransportService, used only in the transport client. The transport client now relies solely on the request holder to notify of failures and eventually retry.

Closes #6829