Commit Graph

9840 Commits

Author SHA1 Message Date
javanna 38f5aa2248 [TEST] Fixed ActionNamesTests to not use random action names that conflict with existing ones
ActionNamesTests#testIncomingAction rarely uses a random action name to make sure that actions registered via plugins work properly. In some cases the random action would conflict with existing one (e.g. tv) and make the test fail. Fixed also testOutgoingAction although the probability of conflict there is way lower due to longer action names used from 1.4 on.
2014-09-16 10:23:02 +02:00
Simon Willnauer fbf2c3f9f7 [TEST] Use node names for transport clients an close them in tests 2014-09-16 10:08:25 +02:00
Boaz Leskes 7253646664 Discovery: not all master election related cluster state update task use Priority.IMMEDIATE
Most notably the elected_as_master task should run as soon as possible. This is an issue as node join request do use `Priority.IMMEDIATE` and can be unjustly rejected.

Closes #7718
2014-09-15 21:26:01 +02:00
Boaz Leskes db13eead54 Internal: ClusterHealthAPI does not respect waitForEvents when local flag is set
It uses a cluster state update task and it gets rejected if not run on a master node. We should enable running on non-masters if the local flag is set.

Also, report any unexpected error that may happen during this cluster state update task

Closes #7731
2014-09-15 21:02:23 +02:00
Ryan Ernst 3397908454 Tools: Add script to grab ES version for BWC tests.
closes #7653
2014-09-15 09:21:55 -07:00
Alexander Reelsen ec86808fa9 Netty: Make sure channel closing never happens on i/o thread
Similar to NettyTransport.doStop() all actions which disconnect
from a node (and thus call awaitUnterruptibly) should not be executed
on the I/O thread.

This patch ensures that all disconnects happen in the generic threadpool, trying to avoid unnecessary `disconnectFromNode` calls.

Also added a missing return statement in case the component was not yet
started when catching an exception on the netty layer.

Closes #7726
2014-09-15 17:54:15 +02:00
Boaz Leskes 2250f58757 Discovery: UnicastZenPing - use temporary node ids if can't resolve node by it's address
The Unicast Zen Ping mechanism is configured to ping certain host:port combinations in order to discover other node. Since this is only a ping, we do not setup a full connection but rather do a light connect with one channel. This light connection is closed at the end of the pinging.

During pinging, we may discover disco nodes which are not yet connected (via temporalResponses). UnicastZenPing will setup the same light connection for those node. However, during pinging a cluster state may arrive with those nodes in it. In that case , we will mistakenly believe those nodes are connected and at the end of pinging we will mistakenly disconnect those valid node.

This commit makes sure that all nodes UnicastZenPing connects to have a unique id and can be safely disconnected.

Closes #7719
2014-09-15 16:47:39 +02:00
mikemccand 7ca64237a8 Test: always run CheckIndex for these two tests 2014-09-15 09:58:14 -04:00
Simon Willnauer 509f71cd55 [TEST] Log if we use transport client in trace mode 2014-09-15 15:42:34 +02:00
Boaz Leskes d228606bab Recovery: remove unneeded waits on recovery cancellation
When cancelling recoveries, we wait for up to 10s for the source node to be notified before continuing. This is not needed in two cases:
1) The source node has been disconnected due to node shutdown (recovery is canceled as a response to cluster state processing)
2) The current thread is the one that will be notifying the source node (happens when one of the calls from the source nodes discoveres the local index is closed)

The first one is especially important as it may delay cluster state update processing with 10s.

Closes #7717
2014-09-15 15:30:54 +02:00
javanna ede39edbba [TEST] Minor REST tests infra cleanup
Make the http addresses within the REST client final. It makes no sense to update them before each test if we don't check the version of the nodes again, which would mean adding too much overhead (an additional http call before each test) for no reason. We just reuse the same nodes for the whole suite and check the version once while initializing the client. Would be nice to make the REST client within the execution context final but its initialization still needs to happen after the `ElasticsearchIntegrationTest#beforeInternal` that assigns `GLOBAL_CLUSTER` to `currentCluster`.

Closes #7723
2014-09-15 15:27:14 +02:00
uboness b619cd1112 Added scrollId/s setters to the different scroll requests/responses 2014-09-15 13:56:48 +03:00
Lee Hinman 964db64ed1 Only set `breaker` when stats are retrieved
When communicating with 1.3 and earlier nodes, it's possible that the
field data breaker info is not sent at all. When this happens, we should
leave the `breaker` variable as-is (unset) instead of creating an
AllCircuitBreakerStats object with a null fd breaker and fake request &
parent breakers.
2014-09-15 12:29:57 +02:00
Colin Goodheart-Smithe d4e83df3b8 Aggregations: Adds ability to sort on multiple criteria
The terms aggregation can now support sorting on multiple criteria by replacing the sort object with an array or sort object whose order signifies the priority of the sort. The existing syntax for sorting on a single criteria also still works.

Contributes to #6917
Replaces #7588
2014-09-15 11:08:29 +01:00
Britta Weber be7c75c745 function score: fix cast in Gaussian decay function
Also fix the test
FunctionScoreTests#simpleWeightedFunctionsTestWithRandomWeightsAndRandomCombineMode
which sometimes failed due to rounding issues. Make sure
only floats are returned as scores to assure ratio of
expected and returned score is 1.0f.
2014-09-15 11:46:20 +02:00
Boaz Leskes 3142fec206 Test: ZenUnicastDiscoveryTests.testNormalClusterForming should start unicast hosts first
The test starts a cluster with random nodes as unicast hosts but *doesn't* use min_master_nodes. If the unicast hosts are started last, nodes may elect themselves as master as they do not have mechanism yet to share information.
2014-09-15 11:23:12 +02:00
javanna 8cf922bf9e Internal: make sure that original headers are used when executing search as part of put warmer
Closes #7711
2014-09-15 09:32:17 +02:00
javanna ec5ceecb97 [TEST] Expose ability to provide http headers when sending requests in our REST tests
ElasticsearchRestTests has now a `restClientSettings` method that can be overriden to provide headers as settings (similarly to what we do with transport client). Those headers will be sent together with every REST requests within the tests.

Closes #7710
2014-09-15 09:30:45 +02:00
Boaz Leskes f96bfd3773 Tests: added trace action.search.type to GeoBoundsTests 2014-09-12 20:16:42 +02:00
Britta Weber 5a8ebab96e [TEST] Fix test explain now that explanation is fixed 2014-09-12 18:12:34 +02:00
Philipp Jardas 5e0f67b516 Fixed explanation for GaussDecayFunction
The explanation now gives the correct value instead of the negative.
2014-09-12 18:12:34 +02:00
Martijn van Groningen 91144fc92f Parent/child: If a p/c query is wrapped in a query filter then CustomQueryWrappingFilter must always be used and any filter wrapping the query filter must never be cached.
Closes #7685
2014-09-12 17:22:07 +02:00
markharwood 3c8f8cc090 Aggs enhancement - allow Include/Exclude clauses to use array of terms as alternative to a regex
Closes #6782
2014-09-12 15:28:03 +01:00
Lee Hinman 3e589cd25b [TEST] Additional logging info for node with primary 2014-09-12 15:42:41 +02:00
Colin Goodheart-Smithe 722ff1f56e [TEST] added trace logging for index recovery in GeoBoundsTests 2014-09-12 13:23:45 +01:00
Boaz Leskes 1002ff2f15 Discovery: restore preference to latest unicast pings describing the same node
Closes #7702
2014-09-12 14:02:43 +02:00
Colin Goodheart-Smithe f8d75faaad Geo: Fixes BoundingBox across complete longitudinal range
Adds a special case to the GeoBoundingBoxFilterParser so that the left of the box is not normalised in the case where left and right are 360 apart.  Before this change the left would be normalised to 180 in this case and the filter would only match points with a longitude of 180 (or -180).

Closes #5128
2014-09-12 10:09:02 +01:00
Clinton Gormley da963ee1f7 Added support for github access tokens to es_release_notes 2014-09-12 10:59:11 +02:00
Colin Goodheart-Smithe 2837800500 [TEST] Adds tests for GeoUtils 2014-09-12 09:43:25 +01:00
Clinton Gormley ea94535557 Fixed bug in es_release_notes script 2014-09-12 10:38:58 +02:00
Boaz Leskes 1bd2a491d1 Tests: add a comment to DiscoveryWithServiceDisruptions.testAckedIndexing reminding to port it to 1.x once the awaitFix is removed 2014-09-12 10:35:18 +02:00
Boaz Leskes 5b461454c2 Tests: add an awaitFix to IndicesLifecycleListenerTests 2014-09-12 10:24:55 +02:00
Clinton Gormley ab250164f0 Update update.asciidoc
The upserts section should be on the same page as updates.
2014-09-12 07:46:03 +02:00
Simon Willnauer a3f2677b70 [CORE] Ensure GroupShardsIterator is consistent across requests
GroupShardsIterator is used in many places like the search execution
to determin which shards to query. This can hold shards of one index
as well as shards of multiple indices. The iteration order is used
to assigne a per-request shard ID for each shard that is used as a
tie-breaker when scores are the same. Today the iteration order is
soely depending on the HashMap iteration order which is undefined or
rather implementation dependent. This causes search requests to return
inconsistent results across requests if for instance different nodes
are coordinating the requests.

Simple queries like `match_all` may return results in arbitrary order
if pagination is used or may even return different results for the same
request even though there hasn't been a refresh call and preferences are
used.
2014-09-12 07:33:07 +02:00
Simon Willnauer 929a4a54f7 [VERSION] Added Version [1.5.0] 2014-09-11 22:38:03 +02:00
Simon Willnauer b9ee915763 [Version] Add Version 1.4.0-Beta 2014-09-11 22:10:19 +02:00
Simon Willnauer a0e9951e8a [STORE] Turn unexpected exception into CorruptedIndexException
Today if we run into exception like NumberFormatException or IAE
when we try to open a commit point to retrieve checksums and calculate
store metadata we just bubble them up. Yet, those are very likely index
corruptions. In such a case we should really mark the shard as
corrupted.
2014-09-11 21:15:02 +02:00
Britta Weber 9b5497f6ca [TEST] fix another rounding issue 2014-09-11 19:49:51 +02:00
Simon Willnauer b0a377bae8 [TEST] Use a sorted set since sets are compared and compare is order specific 2014-09-11 17:42:37 +02:00
javanna 7e0481d906 More Like This API: remove unused search_query_hint parameter
Closes #7691
2014-09-11 17:34:54 +02:00
Martijn van Groningen d0300b3f59 Aggregations top_hits: Fixed inconsistent sorting of the hits
In the reduce logic of the top_hits aggregation if the first shard result to process contained has no results then the merging of all the shard results can go wrong resulting in an incorrect sorted hits.
This bug can only manifest with a sort other than score.

Closes #7697
2014-09-11 17:26:22 +02:00
Simon Willnauer 3ef6860679 [STORE] Improve exception from Store.failIfCorrupted
If you have previously corrupted files, this method currently builds an
exception like:
```
    failed engine [corrupted preexisting index]
    failed to start shard
```

Followed by a CorruptIndexException. This commit writes the entire
stacktrace to provide additional information. It also changes the
failure message from `corrupted preexisting index` to `preexisting
corrupted index` to prevent confusion.

Closes #7596
2014-09-11 17:11:48 +02:00
Clinton Gormley 1455988d91 Changed dev-tools/es_release_notes to:
* remove markdown support
* prefer PRs over issues
* include related issues in the list
* always use section headers if there is a header
2014-09-11 16:46:41 +02:00
Clinton Gormley 269b91c688 Spec: Fixed the docs URL for indices.get and indices.exists 2014-09-11 16:39:46 +02:00
Simon Willnauer 595472014e [TEST] Use a real unique clustername for InternalTestClusterTests 2014-09-11 16:20:51 +02:00
Colin Goodheart-Smithe 8238388bad [DOCS] clarification of breaking changes to 1.4 due to GET index API 2014-09-11 15:04:04 +01:00
Martijn van Groningen f8e93fa2aa Test: Let both types have a non_analyzed id field. 2014-09-11 15:20:28 +02:00
Honza Král 480b90cfd6 [API] Fix minor issues with indices.get definition and tests
mark index param as required
make body match json, not string containing json
2014-09-11 14:36:11 +02:00
javanna fd6798df69 [TEST] parse response body as json depending on the content-type in our REST tests 2014-09-11 14:32:59 +02:00
javanna 4ab268bab2 Internal: refactor copy headers mechanism to not require a client factory
With #7594 we replaced the static `BaseRestHandler#addUsefulHeaders` by introducing the `RestClientFactory` that can be injected and used to register the relevant headers. To simplify things, we can now register relevant headers through the `RestController` and remove the `RestClientFactory` that was just introduced.

Closes #7675
2014-09-11 13:18:08 +02:00