Commit Graph

5688 Commits

Author SHA1 Message Date
Boaz Leskes b66f3c6834 Send the update-mapping events before actually indexing into the shard, because the latter may generate exceptions (like when the shard is not yet ready to accept new docs).
Also improved the SimpleDeleteMappingTest, as it make take a while until the update-mapping event is processed.

Closes #3782
2013-09-26 14:37:12 +02:00
Alexander Reelsen c63869b0be Documentation: Removed service wrapper, added rpm/deb package information 2013-09-26 14:30:25 +02:00
Shay Banon 48ca7b874d use the event cluster state to send events back to master
instead of relying on the current cluster state from the cluster service, make sure to rely on the cluster state we get from the change event, this will allow us to move processing of the cluster event around potentially to before the local cluster state has been updated
2013-09-26 14:04:59 +02:00
Bernhard K. Weisshuhn 93a2742c84 do not silently fail on plugin install with source files 2013-09-26 12:24:07 +02:00
Simon Willnauer 63fdbe9b9b Add more debug info to SimpleDeleteMappingTests 2013-09-25 23:56:38 +02:00
Boaz Leskes 1644444a4f Introduced an index UUID which is added to the index's settings upon creation. Used that UUID to verify old and delayed shard started/failed events are not applied to newer indexes with the same name.
Also, exceptions while processing batched events do not stop the rest of the events from being processed.

Closes #3778
2013-09-25 19:26:05 +02:00
Shay Banon 35990f572b fix to compile under 1.6 2013-09-25 18:02:13 +02:00
Simon Willnauer 500469fd28 Improve EngineSearcher tracking
Currently we fail tests is any searcher reference is pending. Yet,
on a slow machine the freeContext calls that are async could still be
in flight so if there are pending searchers we wait for a bit to make
sure we don't fail if a freeContext call is in flight.
The MockEngine now also contains the stack trace of the first close call
if a searcher is closed twice.
2013-09-25 14:18:34 +02:00
Shay Banon 57d6944f0f add assert to make sure we fix NamedAnalyzer when upgrading to Lucene 4.5 2013-09-25 13:38:45 +02:00
Simon Willnauer a958d2e4fd Added test for DateHistogram#factor
DateHistogramFacets can be used on fields that store dates in a numeric
(long) field using different resolutions like seconds instead of
milliseconds. This commit adds a test that checks if the factor is
applied correctly to scale it up to milliseconds.
2013-09-25 09:36:12 +02:00
Shay Banon 3772201845 add awaitfix on search while relocation with 0 replicas 2013-09-24 17:50:24 +02:00
Simon Willnauer df0112358d Acquire ReadLock before reading SegmentInfos in RobinEngine
Before reading segmentinfos we should aquire the read lock to prevent
reading the segment infos on an already closed robin engine.
2013-09-24 15:55:48 +02:00
Shay Banon 5b1f263569 add origin to failure message 2013-09-24 15:52:13 +02:00
Shay Banon 397f442c6d Introduce internal post recovery state
Introduce a new internal, index shard level, post recovery state, where the shard moves to when its done with recovery. The shard will now move to started only once the cluster state with its respective cluster state level state is started.

This change allow to have more fine grained control over when to allow reads on a shard, resolving potential refresh temporal visibility aspects while indexing and issuign a refresh. By only allowing reads on started shards, and making sure we refresh right before we move to started
2013-09-24 15:38:12 +02:00
Boaz Leskes 10de3a7ecb Moved RecoverAfterNodesTests to inherit from AbstractIntegrationTest 2013-09-24 14:32:41 +02:00
Shay Banon 0422f75c8d improve search while relocation
- add verification phase at the end of the test
- add explicit test for 0 replicas and 1 replica
2013-09-24 13:10:41 +02:00
Shay Banon 4370dfed76 Update Operation might hang (rarely) when retrying on invalid shard state
The retry logic when failing does not reset the operation started flag...
closes #3769
2013-09-24 13:01:45 +02:00
Boaz Leskes 4f8c20f3fe Merge pull request #3767 from gtt116/master
Remove a comma in doc to make example a valid json.
2013-09-24 00:27:39 -07:00
gtt116 6304d58e36 Remove a comma in doc to make example a valid json.
This will help reader to do a hurry up copy-paste test.
2013-09-24 15:23:23 +08:00
Andrew Raines 917a3c3b9d Migrate createIndex(). 2013-09-23 17:04:54 -05:00
Simon Willnauer 26334a7a61 Reenable MockEngineModul as default on TestCluster 2013-09-23 22:17:21 +02:00
Andrew Raines 362c3f7895 One too many... 2013-09-23 15:09:35 -05:00
Andrew Raines 16cde6f10a Remove redundant wipeIndices(). 2013-09-23 15:03:06 -05:00
Simon Willnauer e4af8c720c cut over more tests to AbstractIntegrationTest 2013-09-23 18:18:36 +02:00
Andrew Raines 291cb54c95 Fix misspelling. 2013-09-23 11:06:33 -05:00
Costin Leau 3685a22e4a add docs on new service.bat facility 2013-09-23 18:24:31 +03:00
Simon Willnauer ac5120e722 cut over more tests to AbstractIntegrationTest 2013-09-23 15:53:42 +02:00
Martijn van Groningen 8eab51047f Cut RecoveryPercolatorTests over to AbstractIntegrationTest
Added node restart capabilities to TestCluster
Trigger retry mechanism (onFailure method) instead of invoking transport service with null DiscoveryNode when no DiscoveryNode can be found for a ShardRouting.
2013-09-23 00:19:33 +02:00
Shay Banon e7e39936b8 add internal origin to delete by query 2013-09-22 23:56:30 +02:00
Simon Willnauer 0f17a4c61f disable 'SearchWhileCreatingIndexTests' for now - fix is already in the pipeline 2013-09-22 22:45:39 +02:00
Simon Willnauer 5a365795ec Added support for dynamic transport client ratio in tests.
Currently tests only run with node clients but eventually we want to
run all tests with randomly choosen node / transport clients. To enable
this during development and on test servers as a transition phase this
commit adds the ability to allow a fraction of the clients used in
tests to be transport clients. By default this is still disabled.
To enable transport clients in tests pass '-Dtests.client.ratio=[0..1]'
where '1.0' will force transport clients and '0.0' completely disables
them. If an empty string is passed the ratio is chosen at random for
each test.
2013-09-22 22:25:30 +02:00
Shay Banon ab6715b292 move the internal source for a refresh to be required 2013-09-22 20:24:05 +02:00
Shay Banon 78af818d72 add internal source to acquire searcher
add a source indicating why the searcher was acquired
2013-09-22 18:29:23 +02:00
Shay Banon 167538ef0d add internal source to refresh
can be used to more easily understand where its coming from
2013-09-22 17:58:40 +02:00
Alexander Reelsen 57f962d620 Add completion field support in Rest nodes stats
Closes #3746
2013-09-22 15:02:05 +02:00
Simon Willnauer 0909055e83 Cleanup Integration Tests 2013-09-22 12:05:58 +02:00
Simon Willnauer 4b5935a708 Small cleanups in TransportClient et.al
Catching Throwable instead of Exception in TransportClient
and TransportClientNodesService and restore interrupted flag
if interrupt exception is caught and ignored
2013-09-22 12:05:57 +02:00
Simon Willnauer 58ea539a26 Add missing TransportHandler for clear_sc (ClearScroll) 2013-09-22 12:05:57 +02:00
Simon Willnauer cadbcfeb24 Call validate in TransportClients before request is send 2013-09-22 12:05:57 +02:00
Simon Willnauer c8192dd1f2 Fail GetIndexTemplate if names it null or empty 2013-09-22 12:05:57 +02:00
Simon Willnauer e1aa91dc81 Add listener nodes to nodes list if 'sniff' is true
TransportClient doesn't add the initial nodes to the nodes list
if it doesn't retrieve any nodes from the listeners which can cause
the transport client to throw a 'NoNodeAvailableException' if the
'sniff' response didn't return any nodes. This situation can occure
if the client tries to get the listener nodes cluster state while that
node is not yet connected to any other nodes.
2013-09-22 12:05:57 +02:00
Martijn van Groningen 7c032f6af6 Fixed serialisation bug for multi percolate request and response classes.
This bug manifests when running with transport client.
2013-09-22 12:01:27 +02:00
Shay Banon 74e8d299d6 fix log to trace 2013-09-22 03:19:08 +02:00
Luca Cavanna b28c82a1e6 Added @TestLogging to all methods to see which shards we refresh and which ones we search on
Increased wait timeout and added multiple iterations there as well, one is not enough. We want to verify whether the problem gets fixed later on.
2013-09-21 20:10:43 +02:00
Andrew Raines 953bbe4291 More AbstractIntegrationTest 2013-09-21 00:10:16 -05:00
Andrew Raines 6a18d05393 Add/fix index selectors.
Closes #3758.
2013-09-20 22:25:33 -05:00
Luca Cavanna 2ca1d79530 Moved SimpleIndexStateTests to AbstractIntegrationTest 2013-09-21 02:11:36 +02:00
Shay Banon c6eebf0515 don't clear gateways in reroute test
- also remove test logging from percolator
2013-09-21 01:55:11 +02:00
Luca Cavanna 52e9e753e6 Set nowInMillis to search context created by the explain api so that "NOW" can be used within queries
Added nowInMillis to ExplainRequest in a backwards compatible manner

Fixes #3626
2013-09-20 21:32:52 +02:00
Luca Cavanna 0d3895533c Set nowInMillis to search context created by the validate query api so that "NOW" can be used within queries
Added nowInMillis to ShardValidateQueryRequest in a backwards compatible manner

Fixes #3629
2013-09-20 21:32:13 +02:00