Commit Graph

8832 Commits

Author SHA1 Message Date
Simon Willnauer 55df94d91e Revert "Fix InternalSearchHits serialization to be deterministic"
This reverts commit 8db7b2b20b.
2014-07-22 14:43:31 +02:00
Simon Willnauer 8db7b2b20b Fix InternalSearchHits serialization to be deterministic
The assertion on binary equality for streamable serialization
sometimes fails due to the usage of identify hashmaps inside
the InternalSearchHits serialization. This only happens if
the number of shards the result set is composed of is very high.
This commit makes the serialziation deterministic and removes
the need to serialize the ordinal due to in-order serialization.
2014-07-22 14:14:31 +02:00
Brian Murphy 924f91588b [TEST] Reduce the number of threads in StressUpdateDelete test. 2014-07-22 11:16:32 +01:00
Clinton Gormley 8aefaef68a Update scripting.asciidoc
Added an ID for native java scripts
2014-07-22 11:36:40 +02:00
Simon Willnauer b923f9556f [BUILD] Add BWC tests to release script
This commit adds the ability to run bwc tests during the release
process to ensure the current release is backwards compatible with
the latest installed previous version. Installed means available
in the configured bwc test path.

Closes #6953
2014-07-22 11:11:44 +02:00
Boaz Leskes a344fe6590 IndicesStore fix logging format 2014-07-22 07:47:40 +03:00
Boaz Leskes fee22fc0b2 [Discovery] fix MembershipAction.sendJoinRequestBlocking should now expect an empty response
The change introduced in #6949 (do not serialize the cluster state) also means master now responds with an empty response rather then a JoinResponse. However, sendJoinRequestBlocking still expected a JoinRequest.
2014-07-22 00:43:01 +03:00
Clinton Gormley 7bf9d7271a Test: Set number_of_replicas to zero so that wait_for_green succeeds in search.aggregations 2014-07-21 22:41:15 +02:00
Boaz Leskes 690820dae3 [Discovery] remove unneeded cluster state serialization during cluster join process
At the moment we serialize the cluster state in JoinResponse and ValidateJoinRequest. However this state is not used anywhere and can be removed to save on network overhead

Closes #6949
2014-07-21 23:30:07 +03:00
Brian Murphy c74552e006 [TEST] Stress update/delete
Reduce top end of scaling parameters to avoid OOMs on nightly runs.
2014-07-21 21:16:41 +01:00
Shay Banon 8dca4b7e07 More lenient type parsing in histo/cardinality aggs
closes #6948
closes #6893
2014-07-21 21:31:37 +02:00
Brian Murphy b0ce090876 [TEST] Stress Update/Delete
Create the test index with merging disabled so deletes don't get merged away
this was breaking the version calculation.
2014-07-21 20:11:05 +01:00
Peter Johnson @insertcoffee 77a2c979ab typo
causes the example to fail in bash
2014-07-21 19:09:22 +02:00
Clinton Gormley a862732434 Docs: Typo 2014-07-21 18:51:49 +02:00
Brian Murphy 6d641ea40d [TEST] Remove TransportUpdateActionTest
This test has been made obselete by the UpdateTests.
2014-07-21 17:55:51 +01:00
Brian Murphy 618b51b4cd Merge branch 'master' of github.com:elasticsearch/elasticsearch 2014-07-21 16:26:29 +01:00
Brian Murphy cbb4edf2ae [TEST] Plugin Manager
Undo removal of change.
2014-07-21 16:25:31 +01:00
Brian Murphy eb2898537e Merge branch 'master' of github.com:elasticsearch/elasticsearch 2014-07-21 16:11:12 +01:00
Brian Murphy 8b169617a2 [TEST] Stress test for update and delete concurrency.
This test deletes and updates using upserts documents over several threads in a
tight loop. It counts the number of responses and verifies that the versions at
the end are correct.
2014-07-21 16:04:21 +01:00
Simon Willnauer ffe6cbebd5 [TEST] Activate test in PluginManagerTests that is supposed to be fixed 2014-07-21 16:55:42 +02:00
Simon Willnauer e730c76be7 [RESTORE] Fail restore if snapshot is corrupted
today if a snapshot is corrupted the restore operation
never terminates. Yet, if the snapshot is corrupted there
is no way to restore it anyway. If such a snapshot is restored
today the only way to cancle it is to delete the entire index which
might cause dataloss. This commit also fixes an issue in InternalEngine
where a deadlock can occur if a corruption is detected during flush
since the InternalEngine#snapshotIndex aqcuires a topLevel read lock
which prevents closing the engine.

Closes #6938
2014-07-21 16:15:53 +02:00
Simon Willnauer d65a9d63a2 [Engine] `index.fail_on_corruption` is not updateable
The `index.fail_on_corruption` was not updateable via the index settings
API. This commit also fixed the setting prefix to be consistent with other
setting on the engine. Yet, this feature is unreleased so this won't break anything.

Closes #6941
2014-07-21 14:59:44 +02:00
Adrien Grand abeefbddea Docs: Update documentation about execution hints for the terms aggregation. 2014-07-21 11:55:57 +02:00
Martijn van Groningen f3114fe774 [TEST] top_hits aggs with breath_first collect mode only fails if scoring is used (score based sort or track_scores) 2014-07-21 11:21:50 +02:00
Martijn van Groningen ba1042e7d1 Aggregations: Track scores should be applied properly for `top_hits` aggregation.
Closes #6934
2014-07-21 10:03:42 +02:00
Martijn van Groningen 2d2088b259 [TEST] Temporarily ignore transport update tests. 2014-07-21 09:57:03 +02:00
Simon Willnauer 6e81cb5cd6 [TEST] Add SuppressSysoutChecks to DistributorDirectoryTest 2014-07-20 19:20:18 +02:00
Shay Banon 2c07588a1a [TEST] an active shard might also be relocating 2014-07-20 10:44:24 +02:00
Alexander Reelsen 1816951b6b Netty: Refactoring to make MessageChannelHandler extensible
Small refactorings to make the MessageChannelHandler more extensible.
Also allowed access to the different netty pipelines

This is the fix after the first version had problems with the HTTP
transport due to wrong reusing channel handlers, which is the reason
why tests failed.

Relates #6889
Closes #6915
2014-07-18 16:30:31 +02:00
javanna bbf7e6be92 Plugins: Introduced pluggable filter chain to be able to filter transport actions execution
It's now possible to inject action filters from plugins via `ActionModule#registerFilter` through the following code:

```
    public void onModule(ActionModule actionModule) {
          actionModule.registerFilter(MyFilter.class);
    }
```

Also made `TransportAction#execute` methods final to enforce the execution of the filter chain. By default the chain is empty though.

Note that the action filter chain is executed right after the request validation, as the filters might rely on a valid request to do their work.

Closes #6921
2014-07-18 16:18:50 +02:00
Adrien Grand 97f4247880 [TESTS] Switch more tests to ElasticsearchSingleNodeTest.
This avoids loading modules manually all the time.
2014-07-18 14:35:00 +02:00
Mahesh Paolini-Subramanya 4eca0499fa Plugin Manager: Properly quote $JAVA in bin/plugin
The all new Oracle Java 7 on OSX has a space in its path
resulting in bin/plugin failing to work

Closes #5765
2014-07-18 14:02:50 +02:00
Clinton Gormley 6a7a77eada Docs: Add links to client helper classes for bulk/scroll/reindexing 2014-07-18 13:55:47 +02:00
Shay Banon 972fa10945 Better message for invalid internal transport message format
closes ##6916
2014-07-18 13:49:38 +02:00
Medcl 792d8970e8 [DOCS]: Added link to saltstack module 2014-07-18 12:45:29 +02:00
Simon Willnauer a302f3a9dd [TEST] Randomize Preference in search requests
Closes #6863
2014-07-18 12:30:53 +02:00
Simon Willnauer 6b519633ab [TEST] Randomize FS Translog implementation
Closes #6658
2014-07-18 11:51:42 +02:00
Simon Willnauer d79717c341 [CLIENT] Unknown node version should be a lower bound
Today when we start a `TransportClient` we use the given transport
addresses and create a `DiscoveryNode` from it without knowing the
actual nodes version. We just use the `Version.CURRENT` which is an
upper bound. Yet, the other node might be a version less than the
currently running and serialisation of the nodes info might break. We
should rather use a lower bound here which is the version of the first
release with the same major version as `Version.CURRENT` since this is
what we officially support.

This commit moves to use the minimum major version or an RC / Snapshot
if the current version is a snapshot.

Closes #6894
2014-07-18 11:31:15 +02:00
Alex Ksikes f22f3db30f Term Vectors API: Computes term vectors on the fly if not stored in the index.
Adds the ability to the Term Vector API to generate term vectors for some
chosen fields, even though they haven't been explicitely stored in the index.

Relates to #5184
Closes #6567
2014-07-17 23:29:05 +02:00
Peter Kim 6a25d9b7b5 [DOCS] Fixed typos 2014-07-17 15:25:34 -04:00
Simon Willnauer 6fc5acd760 Return null info if service is not started
Closes #6906
2014-07-17 16:47:46 +02:00
Simon Willnauer 2bec59ec3e [Bulk] Release semaphore again after close
The bulk processor tries to acquire all leases for the semaphore to wait
for all pending requests. Yet, we should release them afterwards again to
ensure we don't ever deadlock if there is a bug in the processor.
This commit also adds a testcase for this method
2014-07-17 16:24:43 +02:00
matt-preston 42b71a004a [Bulk] Add blocking close method to BulkProcessor
Blocks until all bulk requests have completed.

Closes #4158
Closes #6314
2014-07-17 15:57:45 +02:00
uboness cc8f7ddb9a Added three frequency levels for resource watching
It's now possible to register watchers along with a specified check frequency. There are three frequencies: low, medium, high. Each one is associated with a check interval that determines how frequent the watchers will check for changes and notify listeners if needed. By default, the intervals are 5s, 30s and 60s respectively, but they can also be customized in the settings. also:

  - Added the WatcherHandle construct by which one can stop it (remove it) and resume it (re add it). Also provices access to the watchers itself and the frequency by which it's checked
  - Change the default frequency to 30 seconds interval (used to be 60 seconds). The only watcher that is currently effected by this is the script watcher (now auto-loading scripts will auto-load every 30 seconds if changed)
2014-07-17 14:57:53 +02:00
Boaz Leskes bdbe86dd2d [Store] delete unallocated shards under a cluster state task
This is to prevent a rare racing condition where the very same shard gets allocated to the node after our sanity check that the cluster state didn't check and the actual deletion of the files.

Closes #6902
2014-07-17 14:51:07 +02:00
Alexander Reelsen bb421d7ea3 Revert "Netty: Refactoring to make MessageChannelHandler extensible"
This results in unstable tests, most likely due to Channels being mixed
up by wrongly creating the pipelines. Needs investigation and a test.

This reverts commit db7f0d36af.
2014-07-17 14:49:15 +02:00
Boaz Leskes 38d8e3ccc2 [Infra] remove indicesLifecycle.Listener from IndexingMemoryController
The IndexingMemoryController determines the amount of indexing buffer size and translog buffer size each shard should have. It takes memory from inactive shards (indexing wise) and assigns it to other shards. To do so it needs to know about the addition and closing of shards. The current implementation hooks into the indicesService.indicesLifecycle() mechanism to receive call backs, such shard entered the POST_RECOVERY state. Those call backs are typically run on the thread that actually made the change. A mutex was used to synchronize those callbacks with IndexingMemoryController's background thread, which updates the internal engines memory usage on a regular interval. This introduced a dependency between those threads and the locks of the internal engines hosted on the node. In a *very* rare situation (two tests runs locally) this can cause recovery time outs where two nodes are recovering replicas from each other.

 This commit introduces a a lock free approach that updates the internal data structures during iterations in the background thread.

Closes #6892
2014-07-17 14:31:38 +02:00
Adrien Grand 9714dd55c2 Refactoring: Rename FieldMapper.termsFilter to fieldDataTermsFilter.
FieldMapper has two methods
`Filter termsFilter(List values, @Nullable QueryParseContext)` which is supposed
to work on the inverted index and
`Filter termsFilter(QueryParseContext, List, QueryParseContext)` which is
supposed to work on field data. Let's rename the second one to
`fieldDataTermsFilter` and remove the unused `QueryParseContext`.

Close #6888
2014-07-17 12:42:18 +02:00
Colin Goodheart-Smithe 7223e9959d [TEST] Fixed intermittent failure due to lack of mapping 2014-07-17 09:05:58 +01:00
Martijn van Groningen 9037365adf [TEST] Use array* helper assert methods instead of verifying the array directly 2014-07-17 09:39:51 +02:00