Commit Graph

7588 Commits

Author SHA1 Message Date
Igor Motov 7703183cef [TEST] Make sure that a snapshot is completed before trying to modify repository 2014-03-11 17:17:36 -04:00
Simon Willnauer 7e0beead9d [TEST] Beef up SearchStatsTests 2014-03-11 11:36:22 +01:00
Simon Willnauer bb83c823b6 [TEST] Fix SearchStatsTests to have all shards allocated
If randomization brings up a single shard per index in this test
we might run our searches on only one index which causes the assertions
to fail afterwards that's why we need to wait until everything is alloated.
2014-03-11 11:36:22 +01:00
Costin Leau 9624b215fb Add docs for plugin isolation 2014-03-11 12:32:58 +02:00
Costin Leau 5182a3c3fe Add randomized plugin isolation to test infrastructure
fix #5296
2014-03-11 11:45:07 +02:00
Martijn van Groningen a465d97adb Changed debug log to warn for when IW#rollback fails with an exception other than AlreadyClosedException 2014-03-11 13:01:02 +07:00
Igor Motov a0206acbc6 Improve speed of running snapshot cancelation
The delete snapshot operation on a running snapshot should cancel the snapshot execution. However, it interrupts the snapshot only when currently running snapshot files are completely copied, which might take a long time for large files.

Closes #5242
2014-03-10 20:24:04 -04:00
Andrew Selden ba875c3b47 Merge pull request #5360 from aleph-zero/issue-111
REST Testing framework enhancement
2014-03-10 15:24:57 -07:00
Andrew Selden 673c282abd REST Testing framework enhancement
Adding operators 'lte' and 'gte' to our REST test framework. These
operators test for, respectively, less-than-or-equal and
greater-than-or-equal.
2014-03-10 15:08:43 -07:00
Boaz Leskes b7a95d11a7 Introduced VersionType.FORCE & VersionType.EXTERNAL_GTE
Also added "external_gt" as an alias name for VersionType.EXTERNAL , accessible for the rest layer.

Closes #4213 , Closes #2946
2014-03-10 21:07:17 +01:00
uboness bf8d8dc33e Fixed a bug in date_histogram aggregation parsing
- pre_zone_adjust_large_interval was not parsed properly
 - added tests for pre_zone and pre_zone_adjust_large_interval
 - changed DateHistogram#getBucketByKey(String) to support date formats (next to numeric strings)
 - added randomized testing for fetching the bucket by key in date_histogram tests
 - added missing "format" support in DateHistogramBuilder

 Closes #5375
2014-03-10 19:39:34 +01:00
javanna 48f6df3f8e [TEST] Raise shardSize parameter if number of shards is > 5 2014-03-10 18:35:29 +01:00
javanna 045e43163f [TEST] fixed SimpleQueryTests#testDateRangeInQueryString to specify the mappings upfront and wait for green 2014-03-10 17:50:22 +01:00
Simon Willnauer af4c112907 [TEST] Raise shardSize parameter if number of shards is > 5 2014-03-10 17:39:27 +01:00
Martijn van Groningen e9bc7a8cd1 [TEST] Moving mapping creation to create index call, this will make sure that in the test the mapping is always available on all nodes. 2014-03-10 19:21:54 +07:00
javanna d5aaa90f34 [TEST] Randomized number of shards used for indices created during tests
Introduced two levels of randomization for the number of shards (between 1 and 10) when running tests:

1) through the existing random index template, which now sets a random number of shards that is shared across all the indices created in the same test method unless overwritten

2) through `createIndex` and `prepareCreate` methods, similar to what happens using the `indexSettings` method, which changes for every `createIndex` or `prepareCreate` unless overwritten (overwrites index template for what concerns the number of shards)

Added the following facilities to deal with the random number of shards:
- `getNumShards` to retrieve the number of shards of a given existing index, useful when doing comparisons based on the number of shards and we can avoid specifying a static number. The method returns an object containing the number of primaries, number of replicas and the total number of shards for the existing index

- added `assertFailures` that checks that a shard failure happened during a search request, either partial failure or total (all shards failed). Checks also the error code and the error message related to the failure. This is needed as without knowing the number of shards upfront, when simulating errors we can run into either partial (search returns partial results and failures) or total failures (search returns an error)

- added common methods similar to `indexSettings`, to be used in combination with `createIndex` and `prepareCreate` method and explicitly control the second level of randomization: `numberOfShards`, `minimumNumberOfShards` and `maximumNumberOfShards`. Added also `numberOfReplicas` despite the number of replicas is not randomized (default not specified but can be overwritten by tests)

Tests that specified the number of shards have been reviewed and the results follow:
- removed number_of_shards in node settings, ignored anyway as it would be overwritten by both mechanisms above
- remove specific number of shards when not needed
- removed manual shards randomization where present, replaced with ordinary one that's now available
- adapted tests that didn't need a specific number of shards to the new random behaviour
- fixed a couple of test bugs (e.g. 3 levels parent child test could only work on a single shard as the routing key used for grand-children wasn't correct)
- also done some cleanup, shared code through shard size facets and aggs tests and used common methods like `assertAcked`, `ensureGreen`, `refresh`, `flush` and `refreshAndFlush` where possible
- made sure that `indexSettings()` is always used as a basis when using `prepareCreate` to inject specific settings
- converted indexRandom(false, ...) + refresh to indexRandom(true, ...)
2014-03-10 13:01:52 +01:00
Boaz Leskes bb63b3fa61 Improve error detection in geo_filter parsing
Relates to #5370
2014-03-10 12:22:41 +01:00
Simon Willnauer fbb8c0fafa [DOCS] Add `coming` tag to multiple rescores
Closes #5365
2014-03-10 09:27:44 +01:00
Martijn van Groningen 502f24d7e4 Also make use of the thread local memory reuse for a document being percolated with nested objects.
The memory index will only be reused for the root doc, since most of the times that will be the biggest document.
2014-03-10 13:53:02 +07:00
Martijn van Groningen 52d099dfae Don't throw UOE in PercolateContext#from and #size
Create mapping in PercolatorTests#testPercolateSorting_unsupportedField in create index call instead of lazily via index call.
2014-03-10 11:59:24 +07:00
Shay Banon 8cfff9d796 jackson: upgrade to 2.3.2 2014-03-09 23:40:43 +01:00
Shay Banon 3ea746c45e mvel: upgrade to 2.1.9 2014-03-09 22:56:09 +01:00
Clinton Gormley 8383f271d1 [DOCS] Updated the Perl docs 2014-03-09 19:45:16 +01:00
Lee Hinman 51f869cfc2 Increase RamAccountingTermsEnum flush size from 1mb to 5mb
Reduces the number of logs when TRACE logging is turned on for the
circuit breaker
2014-03-07 16:30:43 -07:00
Andrew Raines 2f48be597e Display all available endpoints by default at /_cat
Closes #5106
2014-03-07 13:21:43 -06:00
Konrad Feldmeier d7b0d547d4 [DOCS] Multiple doc fixes
Closes #5047
2014-03-07 14:24:58 +01:00
Benjamin Devèze 2affa5004f Fix small typo in percentiles doc 2014-03-07 10:10:19 +01:00
Adrien Grand f359b7f38b [DOC] The percentiles aggregation is coming in 1.1.0. 2014-03-07 10:03:15 +01:00
Alexander Reelsen 0555170f46 [TEST] Replaced RestApiParser assertions with exceptions for better error messages 2014-03-07 09:35:49 +01:00
uboness da938a659d Introduced a new IMMEDIATE priority - higher than URGENT
* applied to cluster update settings, reroute, node join/leave events, node failure

Closes #5062
2014-03-06 17:02:14 +01:00
Shay Banon 5da883799a since we no longer have bytebuffer dir, this test is not needed 2014-03-06 14:52:54 +00:00
javanna 4d5870807a [TEST] removed explicit index deletion from AnalyzeActionTests, more ensureGreen 2014-03-06 12:23:51 +01:00
Brusic 95274c18c5 Added support for char filters in the analyze API
Closes #5148
2014-03-06 12:23:51 +01:00
Clinton Gormley f4c0c3dae6 [TESTS] Fixed YAML in put_templates test 2014-03-06 12:16:01 +01:00
javanna 9f502b0129 Improved how aliases get parsed in create index
Added also CreateIndexRequest#aliases(BytesReference) method
2014-03-06 11:26:49 +01:00
James Brook a93d6d55a5 Added support for aliases to index templates
Adapted existing PR (#2739) to updated code (post #4920), added tests and docs (@javanna)

Closes #1825
2014-03-06 11:11:07 +01:00
Shay Banon 56fa5458e6 Nicer failure message when node should not connect to another in nodes API
There are cases where nodes should not connect to another node. For example, client nodes do not connect to other client nodes. When executing a nodes level API, we should have a nicer failure indicating that, and not log it by default, as its not a real failure
2014-03-06 10:08:42 +00:00
uboness 9d0fc76f54 Added support for sorting buckets based on sub aggregations
Supports sorting on sub-aggs down the current hierarchy. This is supported as long as the aggregation in the specified order path are of a single-bucket type, where the last aggregation in the path points to either a single-bucket aggregation or a metrics one. If it's a single-bucket aggregation, the sort will be applied on the document count in the bucket (i.e. doc_count), and if it is a metrics type, the sort will be applied on the pointed out metric (in case of a single-metric aggregations, such as avg, the sort will be applied on the single metric value)

 NOTE: this commit adds a constraint on what should be considered a valid aggregation name. Aggregations names must be alpha-numeric and may contain '-' and '_'.

 Closes #5253
2014-03-06 00:05:27 +01:00
Igor Motov b723ee0d20 [DOCS] Update boolean mapping docs with a full list of values that are treated as false
Closes #5337
2014-03-05 15:33:59 -05:00
Shay Banon 941ffe0bf9 if there is no master node id, make sure not to fail the cat call, and report x 2014-03-05 17:56:27 +00:00
Clinton Gormley 98ecf80f07 [DOCS] Formatting error
Closes #5346
2014-03-05 17:40:51 +01:00
Lee Hinman 60f5cf55f3 Fix issue where circuit breaker was always reset to 80% upon startup 2014-03-05 07:32:17 -07:00
Kevin 2c7a3a49c5 [DOCS] add Elasticsearch Image Plugin 2014-03-05 14:16:56 +01:00
Shay Banon 992747a159 Force merges to not happen when indexing a doc / flush
Today, even though our merge policy doesn't return new merge specs on SEGMENT_FLUSH, merge on the scheduler is still called on flush time, and can cause merges to stall indexing during merges. Both for the concurrent merge scheduler (the default) and the serial merge scheduler. This behavior become worse when throttling kicks in (today at 20mb per sec).

In order to solve it (outside of Lucene for now), we wrap the merge scheduler with an EnableMergeScheduler, where, on the thread level, using a thread local, the call to merge can be enabled/disabled.

A Merges helper class is added where all explicit merges operations should go through. If the scheduler is the enabled one, it will enable merges before calling the relevant explicit method call. In order to make sure Merges is the only class that calls the explicit merge calls, the IW variant of them is added to the forbidden APIs list.

closes #5319
2014-03-05 12:26:26 +00:00
Lee Hinman 23471cd72c Implement custom circuit breaker estimator for parent/child field data 2014-03-04 10:52:19 -07:00
Lee Hinman 2bcede168c check for null term in PagedBytesEstimator.bytesPerValue()
Fixes #5326
2014-03-04 10:18:13 -07:00
Holger Hoffstätte 9c7032c427 Rewrite BytesStreamOutput on top of BigArrays/ByteArray.
Fix for #5159
2014-03-04 14:51:26 +01:00
Adrien Grand 5ae1236857 Fix `metric` impl on unmapped fields. 2014-03-04 11:13:38 +01:00
Adrien Grand 610694446a Fix NPE/AIOOBE when building a bucket which has not been collected.
Close #5048
2014-03-04 09:55:21 +01:00
Adrien Grand 66b589d58e Added unit tests for terms and histogram sorting on sub aggregations that return NaN. 2014-03-04 09:46:13 +01:00