Commit Graph

5823 Commits

Author SHA1 Message Date
Shay Banon c3ecd6fd1b REST: Add newline to response when using pretty flag
closes #3748
relates to #3422
2013-09-20 14:55:35 +02:00
Shay Banon 359d14ddc5 doc processors setting 2013-09-20 14:55:35 +02:00
Alexander Reelsen 2624c90efb Using AbstractIntegrationTest in SimpleTTLTests and FunctionScorePluginTests 2013-09-20 13:36:50 +02:00
Simon Willnauer 30d7faeba2 Cut over more tests to AbstractIntegrationTest 2013-09-20 13:31:46 +02:00
Shay Banon 29c0f27a9e fix thread pool docs to remove blocking 2013-09-20 12:31:17 +02:00
Shay Banon b092a0dade use the same client and preference when failing 2013-09-19 18:58:07 +02:00
Luca Cavanna 46753122aa Log line set to TRACE
The default log level for the action package is DEBUG, we don't want to print out lines like this by default in our distribution.
2013-09-19 18:29:55 +02:00
Simon Willnauer 575d6b0321 Cleanup test classes and add Scope support for TestCluster
TestCluster can currently only be used in a globally shared scope.
This commit adds the ability to use the TestCluster in 3 different
scopes per test-suite. The scopes are 'Global', 'Suite' and 'Test'
where the cluster is shared across all tests, across all test methods or
not at all respectivly.
Subclasses of AbstractIntegrationTest (formerly AbstractSharedClusterTest)
can add an annotation if they need a different scope than Global (default):

```
  @ClusterScope(scope=Scope.Suite, numNodes=1)
```
This also allows to specify the number of shared nodes in that TestCluster
that are available when a test starts.

The cleanups in this commit include:

 - s/Elasticsearch/ElasticSearch/g on test classes
 - Move test classes in org.elasticsearch.test
2013-09-19 17:48:22 +02:00
Simon Willnauer de3cde3e1e Rename Engine#seacher() into Engine#acquireSearcher()
The name should reflect that the caller is responsible for
releaseing the searcher again.
2013-09-19 16:43:20 +02:00
Costin Leau 9fe99aa6e9 detect JRE (vs JDK) and invalid JAVA_HOME
fixes #3739
2013-09-19 17:32:33 +03:00
Simon Willnauer 04deb80634 Add asserting searcher to track searcher references
This assertion module also injects an AssertingIndexSearcher that
checks if our queries are all compliant with the lucene specification
which is improtant for future updates and changes in the upstream project.
2013-09-19 16:21:45 +02:00
Shay Banon bb4f30c76c add explicit refresh post failure to test
log the hits post explicit refresh, and post explicit wait for green
2013-09-19 16:18:04 +02:00
Alexander Reelsen 8ab77651ad Added more information to assertion in completion suggest tests 2013-09-19 15:02:11 +02:00
Martijn van Groningen e68f99254b Make sure the transport response handler is invoked only once.
There was a small window of time where the transport response handler's handException method was invoked twice. As far as I can tell this happened when node disconnect event was processed just after the request was registered and between a "Node not connected" error was thrown. The TransportService#sendRequest method would invoke the transport response handler's handException method regardless if it was already invoked. This resulted that for one request failure, two retries were executed.

The mpercolate api has an assert that tripped when more than the expected shard level responses were returned. This was caused by the issue described above. For the a single shard level request we had multiple responses and this broke the the the total excepted responses. Also the reduce could be started prematurely, which resulted in an incorrect final response (e.g. total count being incorrect). For example: two shards in total, shard 0 gets reduces twice. The second shard 0 response gets in just before shard 1 response gets in. The reduce starts without shard 1 response.
2013-09-19 13:24:48 +02:00
Shay Banon 1581f25e27 Discovery to support a timeout waiting for other nodes to processing new cluster state
The master node processing changes to cluster state, and part of the processing is publishing the cluster state to other nodes. It does not wait for the cluster state to be processed on the other nodes before it moves on to the next cluster state processing job.

This is fine, we support out of order cluster state events using versioning, and nodes can handle those cases. It does lead though to non optimal API semantics. For example, when issuing cluster health, and waiting for green state, the master node will report back once the cluster is green based on its cluster state, but that mentioned "green" state might not have been received by all other nodes yet.

Add a discovery.zen.publish_timeout setting, and default it to 5s. This will give a best effort into making sure all nodes will process a cluster state within a window of time.

closes #3736
2013-09-19 13:09:24 +02:00
Luca Cavanna cf0c360f86 Prevented empty filters from causing NPE
Closes #3724
2013-09-18 20:29:01 +02:00
Martijn van Groningen 4958a6805f Updated outdated default setting in doc. 2013-09-18 18:01:23 +02:00
Simon Willnauer a26375ae25 Check if nodes have been shut down in TestCluster#beforeTest
The test cluster ignored randomly teared down nodes in tests.
This commit also adds some debug logging to the TestCluster#beforeTest
method.
2013-09-18 16:22:27 +02:00
Costin Leau 709add033b escape spaces in JAVA_HOME
fix 3725
2013-09-18 17:11:17 +03:00
Shay Banon 4eab186ce6 call ensureGreen instead of explicit call 2013-09-18 14:57:08 +02:00
Britta Weber 04c560ce9f GetActionTests: call ensureGreen() to get more meaningful debug output on failure 2013-09-18 14:33:02 +02:00
Britta Weber 995c55b861 call ensureGreen() to get more meaningful debug output on failure 2013-09-18 14:15:56 +02:00
Shay Banon 84242c208e improve failure message when timing out on green/yellow 2013-09-18 13:38:44 +02:00
Luca Cavanna 15cb0fd745 Removed wrong assertion from OpenCloseIndexTests
If a request hasn't been acknowledged, there's no guarantee for any node to hold the up-to-date cluster state (not even the master yet, as the execution is asynchronous)
2013-09-18 13:04:41 +02:00
Adrien Grand 90524d7ad2 Fix formatting of the documentation.
Remaining '@'s have been replaced with '`'s.
2013-09-18 12:35:44 +02:00
Shay Banon db8f2be8bc improve logging on before/after shared cluster tests 2013-09-18 12:35:20 +02:00
Shay Banon 6a04c16932 Delete Template: When deleting with * and no templates exists, don't 404
closes #3723
2013-09-18 12:28:24 +02:00
Luca Cavanna 2d52973783 Added acknowledgment timeout test to OpenCloseIndexTests 2013-09-18 11:49:09 +02:00
Martijn van Groningen e84af5c8fd If there is an exception that indicates that the shard isn't available then the exception should bubble up to the TransportShardSingleOperationAction class, so the shard level request can be retried on a different shard. (multi get api) 2013-09-18 10:54:00 +02:00
Martijn van Groningen ae3f54bdb5 Don't wrap the exception in an ElasticSearchException when shard isn't available. 2013-09-18 10:53:34 +02:00
Martijn van Groningen f307336670 If there is an exception that indicates that the shard isn't available then the exception should bubble up to the TransportShardSingleOperationAction class, so the shard level request can be retried on a different shard. (multi term vector api) 2013-09-18 10:52:37 +02:00
Simon Willnauer 80b7377b29 Disable random ram directories to prevent OOM during tests.
We need to find a way to enable this without adding crazy heaps etc.
Maybe only selected tests can run this.
2013-09-18 08:28:41 +02:00
Simon Willnauer 81bd1f9fd2 Randomized SearchScanTests 2013-09-17 23:29:49 +02:00
Simon Willnauer 1499881c36 Simplify NestedFieldComparators for numerics
The average and sum comparators basically share the same code which is
copy-past today. We can simplify this into a base class which reduces
code duplication and prevents copy-paste bugs.
2013-09-17 23:07:36 +02:00
Simon Willnauer cabbf7805b Make TestCluster based integration tests more repoducible
While testing an async system providing reproducible tests that
use randomized components is a hard task we should at least try to
reestablish the enviroment of a failing test as much as possible.
This commit allows to re-establish the shared 'TestCluster' by
resetting the cluster to a predefined shared state before each test.

Before this commit a tests that is executed in isolation was likely
using a entirely different node enviroment as the failing test since
the 'TestCluster' kept intermediate nodes started by other tests around.
2013-09-17 23:07:29 +02:00
Shay Banon e110d53b0c change default number of test jvms to 1
the auto default can cause a lot of pressure on a machine when running the tests (each process actually runs a multi node cluster)
2013-09-17 21:30:27 +02:00
Britta Weber b7c3b50909 add date field to decay function doc 2013-09-17 19:54:31 +02:00
Clinton Gormley bf41f56f24 Added sort_mode and sortMode parameters to _geo_distance sort.
Previously it just support the "mode" parameter, which is
inconsistent

Closes #3717
2013-09-17 18:26:30 +02:00
Martijn van Groningen ca8b3ac0ba Don't throw set exception if it is an error based exception, this breaks how we deal with assertions in general. 2013-09-17 17:20:11 +02:00
Shay Banon ddc2b428d6 add 0.90.6 2013-09-17 15:04:48 +02:00
Simon Willnauer d45bf0b71e Print '-Des.x.y' properties in reproduce line 2013-09-17 14:28:51 +02:00
David Pilato 1e3ffa0df7 Add distance supported units 2013-09-17 14:21:45 +02:00
Costin Leau dcc45070bd Merge pull request #3702 from costin/master
add elasticsearch as a service for Windows platforms
2013-09-17 05:16:29 -07:00
Costin Leau 08bf131899 rework script to handle path with spaces
use service id for pid name
disable filtering on *.exe (caused corruption)
rename exe names and add more options to .bat
start/stop operations are now supported (and expected to be called) by service.bat
add more variables from the env to customize default behavior prior to installing the service
add manager option
fixes regarding batch flow
specify service id in description
minor readability improvement
include .exe only in ZIP archive
rename x64 service id to make it work out of the box
add elasticsearch as a service for Windows platforms
based on Apace Commons Daemon
supports both x64 and x86
2013-09-17 15:01:09 +03:00
Shay Banon cf30cb1caa Alias filter not applied when using 'multi-index' syntax with wild card in URL
closes #3677
2013-09-17 13:30:40 +02:00
Luca Cavanna 4013980b11 Serving cluster state version log line set to TRACE instead of DEBUG 2013-09-17 10:41:23 +02:00
Simon Willnauer dd8512ddd1 Autodetect indices when 'indexRandom' is used. 2013-09-17 09:22:25 +02:00
Simon Willnauer c18219e90d Create should use the same index name as the index request in tests 2013-09-17 09:02:49 +02:00
Alexander Reelsen e1cbbbaa60 Elasticsearch startup script supports directories containing spaces
Closes #3712
2013-09-17 08:14:23 +02:00
Shay Banon ae0489266e Add `node.mode` with `local` or `network`
Compared to setting node.local to true, would be nicer to support node.mode with values of local or network.

Note, node.local is still supported.

closes #3713
2013-09-17 00:34:10 +02:00