Commit Graph

8082 Commits

Author SHA1 Message Date
Simon Willnauer 27d4d76769 [BUILD] remove leftover print statement 2014-04-14 22:23:10 +02:00
Simon Willnauer 0564c883be Remove unused FileSystemUtils#copyFile 2014-04-14 21:48:27 +02:00
Simon Willnauer a215dd3ae8 Prevent fsync from creating 0-byte files
This is related to LUCENE-5570 where fsync creates a 0-byte file
if the file does not exists. This commit adds the patched lucene
version using Java 7 APIs as well as a note to replace this method
with the upcomeing IOUtils#fsync in Lucene 4.8

This commit cleans up FsImmutableBlobContainer#writeBlob to make
use of Java7 Auto-Closing features and ensures that the directory
the blob was written to is fsynced as well if possible.
2014-04-14 21:48:23 +02:00
Simon Willnauer 11bf13c363 Check for no open issues before build release 2014-04-14 18:54:04 +02:00
Simon Willnauer 754eb16835 Upgrade to Lucene 4.7.2 2014-04-14 18:30:03 +02:00
Adrien Grand e458d4fd93 Improved SearchContext.addReleasable.
For resources that have their life time effectively defined by the search
context they are attached to, it is convenient to use the search context to
schedule the release of such resources.

This commit changes aggregations to use this mechanism and also introduces
a `Lifetime` object that can be used to define how long the object should
live:
 - COLLECTION: if the object only needs to live during collection time and is
   what SearchContext.addReleasable would have chosen before this change
   (used for p/c queries),
 - SEARCH_PHASE for resources that only need to live during the current search
   phase (DFS, QUERY or FETCH),
 - SEARCH_CONTEXT for resources that need to live until the context is
   destroyed.

Aggregators are currently registed with SEARCH_CONTEXT. The reason is that when
using the DFS_QUERY_THEN_FETCH search type, they are allocated during the DFS
phase but only used during the QUERY phase. However we should fix it in order
to only allocate them during the QUERY phase and use SEARCH_PHASE as a life
time.

Close #5703
2014-04-14 17:42:41 +02:00
Adrien Grand e589301806 Make Releasable extend AutoCloseable.
Java7's AutoCloseable allows to manage resources more nicely using
try-with-resources statements. Since the semantics of our Releasable interface
are very close to a Closeable, let's switch to it.

Close #5689
2014-04-14 17:21:42 +02:00
Adrien Grand e688f445ad [TEST] Use indexRandom in ShardSizeTests. 2014-04-14 12:31:34 +02:00
Simon Willnauer 1ce56ff969 Revert "Don't lookup version for auto generated id and create"
This reverts commit dc73498454.
2014-04-14 12:15:02 +02:00
Shay Banon dc73498454 Don't lookup version for auto generated id and create
When a create document is executed, and its an auto generated id (based on UUID), we know that the document will not exists in the index, so there is no need to try and lookup the version from the index.
For many cases, like logging, where ids are auto generated, this can improve the indexing performance, specifically for lightweight documents where analysis is not a big part of the execution.
2014-04-14 10:06:53 +02:00
Peter Dyson f8537183b9 [DOCS] update old status of plugins 2014-04-13 20:18:19 -04:00
Simon Willnauer ad143e16cf [TEST] Fix ClusterStatsTests#testValuesSmokeScreen to wait for yellow to get reliable FS stats. 2014-04-12 23:02:31 +02:00
Simon Willnauer ec3c635696 [TEST] use a real upperbound for the check on the time spend during suggestions 2014-04-12 21:54:46 +02:00
Shay Banon e9c0dd9ae4 [Test] should be abstract 2014-04-12 16:14:58 +02:00
Simon Willnauer efb749936b [TEST] Improve performance of MockBigArray MockPageRecycler 2014-04-11 23:02:59 +02:00
Simon Willnauer 5d611a9098 Ensure pending merges are updated on segment flushes
Due to the default of `async_merge` to `true` we never run
the merge policy on a segment flush which prevented the
pending merges from being updated and that caused actual
pending merges not to contribute to the merge decision.

This commit also removes the `index.async.merge` setting is actually
misleading since we take care of merges not being excecuted on the
indexing threads  on a different level (the merge scheduler) since 1.1.

This commit also adds an additional check when to run a refresh
since soely relying on the dirty flag might leave merges un-refreshed
which can cause search slowdowns and higher memory consumption.

Closes #5779
2014-04-11 23:02:59 +02:00
Boaz Leskes e0fbd5df52 PR #5706 introduced a bug in the sparse array-backed field data
When we load sparse single valued data, we automatically assign a missing value to represent a document who has none. We try to find a value that will increase the number of bits needed to represent the data. If that missing value happen to be 0, we do no properly intialize the value array.

This commit solved this problem but also cleans up the code even more to make spotting such issues easier in the future.
2014-04-11 21:34:36 +02:00
Boaz Leskes 63d1fa45ab Added awaitFix for SimpleNestedTests.testSortNestedWithNestedFilter
While investigating failures
2014-04-11 18:12:35 +02:00
Malte Schirnacher 8ce3bba010 Fix typos in percolate.asciidoc
Close #5762 #5763 #5764
2014-04-11 18:09:16 +02:00
Boaz Leskes f549472fea Fixed- PackedArrayIndexFieldData.chooseStorageFormat compared to Long.MAX_VALUE instead of Long.MIN_VALUE
Also made the LongFieldDataTests.SINGLE_VALUED_SPARSE_RANDOM & LongFieldDataTests.MULTI_VALUED_SPARSE_RANDOM more sparse
2014-04-11 16:40:47 +02:00
Boaz Leskes 1d1ca3befc Added a AppendingDeltaPackedLongBuffer-based storage format to single value field data
The AppendingDeltaPackedLongBuffer uses delta compression in paged fashion. For data which is roughly monotonic this results in reduced memory signature.

By default we use the storage format expected to use the least memory. You can force a choice using a new field data setting `memory_storage_hint` which can be set to `ORDINALS`, `PACKED` or `PAGED`

Closes #5706
2014-04-11 15:50:34 +02:00
Chris Earle e8ea9d7585 Strengthening pseudo random number generator and adding tests to verify its behavior.
Closes #5454 and #5578
2014-04-11 14:01:40 +02:00
Martijn van Groningen 45a1b44759 Each search request should use a new InternalSearchResponse instance even in case when all shards return no hits.
The InternalSearchResponse may get modified afterwards, so a new instance required at all times.
2014-04-11 17:44:21 +07:00
Simon Willnauer 862611b792 [TEST] Prevent TTLPurger from recreating deleted index
Related to #5766
2014-04-11 09:03:28 +02:00
Martijn van Groningen 01794bf8ea Ignored clear scroll rest test 2014-04-11 13:47:41 +07:00
Martijn van Groningen b400129597 The clear scroll apis now optionally accepts a scroll_id in it body.
Closes #5726
2014-04-11 10:39:59 +07:00
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
Sean Gallagher 80ebd49253 [DOCS] Added tables and fixes to upgrade.asciidoc, fixed version in README.textile
Author: Sean Gallagher
Date: 10 Apr 2014 15:23 EDT
2014-04-10 15:23:07 -04:00
Nik Everett 40f1913cf3 [Docs] Add experimental highlighter plugin 2014-04-10 13:32:34 -04: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 bceac036af Fix _bench endpoint specs to have the body on the right level in the json object 2014-04-09 23:16:52 +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
Nik Everett af0278b51b [Docs] Allocation setting explanation
Closes #5748
2014-04-09 12:11:36 -06: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 a9c8624c67 [TEST] MLT Rest test needs a mapping since we randomized number of nodes/shards 2014-04-09 11:45:55 +02: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 7eb8b0d0c0.
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