4062 Commits

Author SHA1 Message Date
Martijn van Groningen
c4a49c2488 Fixed an where a nested nested aggregation falls outside of its parent nested aggregation bounds.
The nested `nested` aggs now gets the proper parent docs that define its bounds correctly.

Closes #5728
2014-04-11 10:16:17 +07:00
Martijn van Groningen
7bf3ffe73c Added test with AwaitsFix annotation that simulates a split brain. 2014-04-10 20:13:59 +07:00
Shay Banon
7a26b49298 Use startNodesAsync in more tests 2014-04-10 14:59:11 +02:00
Adrien Grand
53cbaa0af1 [TESTS] Add more assertSearchResponse to aggregations tests. 2014-04-10 11:34:41 +02:00
Simon Willnauer
206799662c [TEST] Allow higher ClusterHealthTimeout on tests if configuration is slow 2014-04-10 10:49:32 +02:00
Simon Willnauer
34a3e8af35 Add better error reporting to RestApiParser if assertions are tripped 2014-04-09 23:16:17 +02:00
Andrew Selden
e2c8ff92ba Benchmark API
Add an API endpoint at /_bench for submitting, listing, and aborting
search benchmarks. This API can be used for timing search requests,
subject to various user-defined settings.

Benchmark results provide summary and detailed statistics on such
values as min, max, and mean time. Values are reported per-node so that
it is easy to spot outliers. Slow requests are also reported.

Long running benchmarks can be viewed with a GET request, or aborted
with a POST request.

Benchmark results are optionally stored in an index for subsequent
analysis.

Closes #5407
2014-04-09 13:06:55 -07:00
Lee Hinman
9aa1cb408e Fix format string for DiskThresholdDecider reroute explanation 2014-04-09 08:49:49 -06:00
Costin Leau
960d353dbd Remove plugin isolation feature for a future version
relates #5261
2014-04-09 17:28:11 +03:00
Simon Willnauer
cd0c0de088 [TEST] RecoveryWhileunderLoadTests sometimes need higher timeouts
In some cases when we have a lot of docs with lots of shards
recovery takes longer than 1m causing the tests to fail before all
shards are recovered. This commit raises the timeout in this test to
5m max while it's rarely needed.

This commit also adds an assertion to ElasticsearchAssertions that
ensures that the cluster health requests are not hitting a timeout.
2014-04-09 11:37:02 +02:00
Boaz Leskes
6d966837d1 [Test] recoverWhileRelocating: Increase timeout while waiting for shards to replicate. 2014-04-08 20:53:31 +02:00
Simon Willnauer
adc9a250ab Fix P/C assertions for rewrite reader
Inner queries must be rewritten as soon as a weight is pulled ie. must
be non-null.

Closes #5731
2014-04-08 17:47:31 +02:00
Simon Willnauer
5b6fd6de42 [TEST] Fix testRandomDirectoryIOExceptions to wait for green on reopen & add more assertions 2014-04-08 17:46:56 +02:00
Simon Willnauer
a98b3fa1ff Revert "[TEST] Log where locks are created from if they are still open on close()"
This reverts commit 7eb8b0d0c0b2ef3adcfd7b1e10ea0ca9a50c1adc.
2014-04-08 16:18:15 +02:00
Simon Willnauer
7eb8b0d0c0 [TEST] Log where locks are created from if they are still open on close() 2014-04-08 15:14:08 +02:00
Simon Willnauer
de13d707ed [TEST] Wait for LANGUID events to be processed before pulling stats 2014-04-08 12:41:13 +02:00
Boaz Leskes
e8467f0978 Failed shards could be re-assigned to the same nodes if multiple replicas failed at once
After a shard fails on a node we assign a new replica on another node. This is important in order to avoid failing again due to node specific problems. In the rare case where two different replicas of the same shard failed in a short time span, we may fail to do so and assign one of them back to the node it's currently on. This happens if both shard failed events are processed within the same batch on the master.

Closes #5725
2014-04-08 12:10:45 +02:00
Simon Willnauer
c58b823e9f [TEST] Add more randomization to bulk tests 2014-04-08 11:38:08 +02:00
Simon Willnauer
fd8a6ac382 [TEST] make BulkTest more robust if test infra is slow 2014-04-08 11:11:56 +02:00
Shay Banon
a1d0eee6bf [TEST] return the correct transport instance in mock transport 2014-04-07 22:34:56 +02:00
Simon Willnauer
49c74e0885 Rename successulOps to successfulOps in TransportSearchTypeAction 2014-04-07 22:15:09 +02:00
Simon Willnauer
befa833385 Make sure successful operations are correct if second phase is fast
In TransportSearchTypeAction we  need to increment successful ops
first before we increment and compare the exit condition otherwise if we
are fast we could concurrently update totalOps but then preempt one
of the threads which can cause the successor to read a wrong value from
successfulOps if second phase is very fast ie. searchType == count etc.
This can cause wrong success stats in the search response.
2014-04-07 22:15:09 +02:00
Simon Willnauer
f2181d5cbf [TEST] Be more verbose if ClusterStatsTests fails 2014-04-07 22:14:10 +02:00
Andrew Selden
033e46f8af Rename readPrimitive*Array()/writePrimitive*Array() methods
Make method names shorter and easier to read.

Closes #5711
2014-04-07 11:15:21 -07:00
Matt Weber
e3187d5b9a Update LongHash to work like BytesRefHash.
- rename "key" to "get"
- update and add more tests

Closes #5693
2014-04-07 19:59:08 +02:00
Andrew Selden
fb338ef753 Make writePrimitive*() and readPrimitive*() methods public.
These utility methods are useful for client code to read/write arrays of
primitive types.
2014-04-07 10:38:57 -07:00
Simon Willnauer
f1a8aadb63 [TEST] null out static resources in base test classes 2014-04-07 18:17:25 +02:00
javanna
1ec4f8f04b [TEST] Replaced RestTestSuiteRunner with parametrized test that uses RandomizedRunner directly
ElasticsearchRestTests extends now ElasticsearchIntegrationTest and makes use of our ordinary test infrastructure, in particular all randomized aspects now come for free instead of having to maintain a separate (custom) tests runner

We previously parsed only the tests that needed to be run given the version of the cluster the tests are running against. This doesn't happen anymore as it didn't buy much and it would be harder to support as the tests get now parsed before the test cluster gets started. Thus all the tests are now parsed regardless of their skip sections, afterwards the ones that don't need to be run will be skipped through assume directives.

Fixed REST tests that rely on a specific number of shards as this change introduces also random number of shards and replicas (through randomIndexTemplate)

Closes #5654
2014-04-07 17:08:05 +02:00
Shay Banon
705c7e2469 Recycled bytes in http + rest layer refactoring phase 2
Refactor the rest layer handlers to simplify common code paths (like handling) failures, and introduce optional (enabled for netty) rest channel bytes recycling
2014-04-07 15:29:04 +02:00
uboness
c9b0b04f55 Aggregation cleanup
- consolidated value source parsing under a single parser that is reused in all the value source aggs parsers
- consolidated include/exclude parsing under a single parser
- cleaned up value format handling, to have consistent behaviour across all values source aggs
2014-04-07 14:34:17 +02:00
Miltos Allamanis
dc15dee323 Renamed ClusterBlocks variable named "block" to "blocks".
"blocks" has been used 9 times for variable names of type
ClusterBlocks but block has been used only this case. It
seems to be a typo.
2014-04-07 12:26:06 +02:00
Miltos Allamanis
40a1ac82ef Renamed XContentParser.Token named "t" to "token".
The name "token" was declared 191 times for XContentParser.Token
objects, while "t" was used only 6 times.
2014-04-07 12:26:06 +02:00
Shay Banon
37c07ef765 disable args tests that cause page/array leak
related to #5703
2014-04-07 11:25:18 +02:00
Shay Banon
d64d0d6a97 Remove clear on mock page/array
since we use a shared cluster, calling clear on the mock array / page recycler can cause removing a valid on going reference, and then when its released, the release will fail because it can't be found.
There is no real reason to call clear, checking if pages/arrays have been released takes the snapshot behavior here into account.
This change also makes sure we don't use the mock classes in places where we don't really release.

Note, with this change DoubleTermsTests fails, since it causes failures when creating aggs in the pre process phase, causing obtained arrays not to be released. This needs to be fixed before pulling this change in.
2014-04-07 11:25:18 +02:00
Kevin Wang
ecab74fe6c add lucene language model similarities (Dirichlet & JelinekMercer) 2014-04-07 10:48:03 +02:00
Adrien Grand
9df655adb2 Remove AtomicFieldData.isValuesOrdered.
This method is not used anymore.

Close #5688
2014-04-07 10:30:10 +02:00
Kevin Wang
866c520abb Add doc value for binary field.
Close #5669
2014-04-07 10:18:55 +02:00
Martijn van Groningen
ade1d0ef57 Added global ordinals (unique incremental numbering for terms) to fielddata.
Added a terms aggregation implementations that work on global ordinals, which is also the default.

Closes #5672
2014-04-07 11:06:41 +07:00
Boaz Leskes
7b9df39800 [Test] Added better control over the number of documents indexed by BackgroundIndexer
Used the new controls to reduce indexing activity in RelocationTests and RecoveryWhileUnderLoadTests

Closes #5696
2014-04-06 20:49:27 +02:00
Shay Banon
d26a956231 releasable bytes output + use in transport / translog
create a new releasable bytes output, that can be recycled, and use it in netty and the translog, 2 areas where the recycling will help nicely.
Note, opted for statically typed enforced releasble bytes output, to make sure people take the extra care to control when the bytes reference are released.
 Also, the mock page/array classes were fixed to not take into account potential recycling going during teardown, for example, on a shared cluster ping requests still happen, so recycling happen actively during teardown.
closes #5691
2014-04-06 20:23:21 +02:00
Simon Willnauer
a5aafbb04c [TEST] Prevent RelocationTests from going crazy when relocations take time 2014-04-05 22:36:16 +02:00
Simon Willnauer
124d370b5f [TEST] cleanup secondary cluster properly in Tribe tests. 2014-04-05 22:18:38 +02:00
Lee Hinman
211f740100 Add getAsRatio to Settings class, allow DiskThresholdDecider to take percentages
Adds new RatioValue class that parses ratios between 0-100% expressed in
either floating-point (0.13) or percentage (51.12%) notation.

Closes #5690
2014-04-04 13:19:35 -06:00
Lee Hinman
3248359660 log full exception in InternalClusterInfoService unless it's a ClusterBlockException 2014-04-04 13:06:01 -06:00
Daniel Winterstein
08be94b455 Adding javadoc to UpdateRequestBuilder for a couple of details it took me a while to find. 2014-04-04 17:56:08 +02:00
Timo Rantalaiho
3ae02b0b60 Show stacktrace of startup exception
Whether or not the stacktrace is displayed is controlled by bootstrap
log level setting, so that bootstrap: DEBUG displays the stack trace on
output, like it does on log

Closes #5102
2014-04-04 17:15:41 +02:00
Simon Willnauer
4d6eb369a3 [TEST] Wait for nodes to join before asserting on cluster stats 2014-04-04 14:06:09 +02:00
Boaz Leskes
940954bfd1 [Test] added trace logging to refresh action to note which cluster version was used
Increase logging level for SearchWithRandomExceptionsTests.testRandomExceptions & MinDocCountTests to use the above and log cluster states on changes.
2014-04-04 13:17:28 +02:00
Kevin Wang
f582212c68 geo_point doesn't allow null values
After upgrading to 1.1.0, sending null values to geo points produces the following error:

```
MapperParsingException[failed to parse]; nested: ElasticsearchParseException[geo_point expected];
```

Closes #5680.
Closes #5681.
2014-04-04 10:53:10 +02:00
Adrien Grand
8a09ec0e06 [TEST] Harden GeoShapeIntegrationTests. 2014-04-04 09:41:07 +02:00