Commit Graph

5599 Commits

Author SHA1 Message Date
Shay Banon cd90382964 upgrade to google guava v 15 2013-09-16 09:14:00 +02:00
Britta Weber 3162eb4dcf defining filter is not always needed, we can assume match all if no filter is given 2013-09-16 00:30:03 +02:00
Shay Banon 20745adadd Add dedicated Suggest Thread Pool
Add a dedicated suggest thread pool for the suggest API. With the new completion suggest type, which is purely CPU bounded, it makes more sense to have a dedicated thread pool for suggest compared to having it share the search thread pool and "competing" against other search operations.
closes #3698
2013-09-15 01:54:27 +02:00
Shay Banon 4a97af3cd4 use static TL for common numeric precision values 2013-09-15 01:40:35 +02:00
Shay Banon 1c921aebe5 update plugin 2013-09-14 23:31:56 +02:00
Shay Banon 89e0b325c2 Briefly delete manifested mapping type on a node without reason
When a dynamic type is introduced during indexing, the node that introduces it sends the fact that its added to the master, to be added to the master node. The master node then adds it to the index metadata and republishes that fact.

In order not to delete the mapping while the new type is introduced on the node that introduced it, we keep a map of seen mappings, and remove a mapping type when we already processed it.

The map is not properly cleared though in all places where an actual index service is being removed on a node.

closes #3697
2013-09-14 22:42:53 +02:00
Britta Weber e58900145b tag with @AwaitsFix because it causes the test suite to crash
see #3694
Also, this might have caused one of the problems described in issue #3674
2013-09-14 11:51:34 +02:00
Shay Banon d6a3fc09f0 better logging
trace log the low level details on recovery
2013-09-13 22:46:04 +02:00
Shay Banon 056a678fa8 use built in flush/refresh helper methods 2013-09-13 22:06:12 +02:00
Shay Banon df3f681ef0 Optimize API: Remove refresh flag
Refresh flag in optimize is problematic, since the shards refresh is allowed to execute on is different compared to the optimize shards. In order to do optimize and then refresh, they should be executed as separate APIs when needed.
closes #3690
2013-09-13 21:44:38 +02:00
Shay Banon 7cc48c8e87 Flush API: remove refresh flag
Refresh flag in flush is problematic, since the shards refresh is allowed to execute on is different compared to the flush shards. In order to do flush and then refresh, they should be executed as separate APIs when needed.
closes #3689
2013-09-13 21:09:45 +02:00
Shay Banon 4298c50119 allow refresh to execute on a relocating shard as well 2013-09-13 20:03:58 +02:00
Simon Willnauer d9a055fe54 Add integration test for regex field data filter 2013-09-13 19:55:50 +02:00
Lee Hinman 92a7b2465c Add TESTING document describing test settings 2013-09-13 11:51:15 -06:00
Adrien Grand f03816ff07 Log failures at closing the SearcherManager. 2013-09-13 18:03:28 +02:00
Alexander Reelsen 26f9968b3b Allow packages to disable immediate restart on package upgrade
Both package types, RPM and deb now contain an option to not restart on upgrade.

This option can be configure in /etc/default/elasticsearch for dpkg based systems
and /etc/sysconfig/elasticsearch for rpm based systems.

By default the setting is as before, where a restart is executed on upgrade.

Closes #3685
2013-09-13 17:45:39 +02:00
Shay Banon ba6bc2a4df improve logging
the source of the default mappings should be trace logged
2013-09-13 17:38:57 +02:00
Shay Banon 455d0be982 improve visibility of clusterState and shardsIt
In case of retries, we update the clusterState and shardsIt, make sure they are visible using volatile (even though updates will probably go through a memory barrier, this might explain rare failure we see when retry happens)
2013-09-13 17:35:01 +02:00
Luca Cavanna f7ff272560 Improved test
Introduced ElasticsearchAssertions that check for failures in all response
Added comment to flush requests as we don't check for failures there
Attempt to remove Thread.sleep in testChangeInitialShardsRecovery in favour of awaitBusy block
Added awaitBusy block in testQuorumRecovery waiting for YELLOW. We could have GREEN after the close node but wa want to wait for the YELLOW state.
2013-09-13 16:39:08 +02:00
Luca Cavanna bb0baa20fb Removed wrong assertion that makes recoverWhileUnderLoadWithNodeShutdown fail.
As we are within an awaitBusy block, it doesn't make sense to have an assertion, since it would fail the test instead of waiting till the condition is verified (till timeout expires)
2013-09-13 16:39:08 +02:00
Shay Banon ea00e39ff1 use trace logging on cluster state driven indexing 2013-09-13 16:35:11 +02:00
Clinton Gormley fd9f62b9b7 [DOCS] Added Cold Fusion client to community page 2013-09-13 16:20:38 +02:00
David Pilato a2444e9494 Remove get index templates deprecated methods
In 0.90.4, we deprecated some code:

* `GetIndexTemplatesRequest#GetIndexTemplatesRequest(String)` moved to `GetIndexTemplatesRequest#GetIndexTemplatesRequest(String...)`
* `GetIndexTemplatesRequest#name(String)` moved to `GetIndexTemplatesRequest#names(String...)`
* `GetIndexTemplatesRequest#name()` moved to `GetIndexTemplatesRequest#names()`

* `GetIndexTemplatesRequestBuilder#GetIndexTemplatesRequestBuilder(IndicesAdminClient, String)` moved to  `GetIndexTemplatesRequestBuilder#GetIndexTemplatesRequestBuilder(IndicesAdminClient, String...)`

* `IndicesAdminClient#prepareGetTemplates(String)` moved to `IndicesAdminClient#prepareGetTemplates(String...)`

* `AbstractIndicesAdminClient#prepareGetTemplates(String)` moved to `AbstractIndicesAdminClient#prepareGetTemplates(String...)`

We can now remove that old methods in 1.0.

**Note**: it breaks the Java API

Relative to #2532.
Closes #3681.
2013-09-13 15:08:59 +02:00
David Pilato ea4988e9dc Support for REST get ALL templates.
/_template shows: No handler found for uri [/_template] and method [GET]

It would make sense to list the templates as they are listed in the /_cluster/state call.

Closes #2532.
2013-09-13 15:08:59 +02:00
Britta Weber e3b826f87e add wait for green to prevent test failure 2013-09-13 14:50:51 +02:00
Clinton Gormley a6fffae6df Changed .gitignore to ignore all files in .settings except
for the ones that we want to preserve, to ensure a common
coding style between IDEA and Eclipse
2013-09-13 12:40:10 +02:00
Shay Banon d66d326ba9 mark test base classes as abstract 2013-09-13 12:14:52 +02:00
David Pilato e2400bc40e Fix possible NPE due to #3658 change 2013-09-13 11:49:16 +02:00
David Pilato b27e7d3cc9 Remove RestActions#splitXXX(String) methods
* `RestActions#splitIndices(String)`
* `RestActions#splitTypes(String)`
* `RestActions#splitNodes(String)`

And replace with `Strings.splitStringByCommaToArray(String)`

Closes #3680.
2013-09-13 11:36:43 +02:00
Clinton Gormley 17fb10689c The docs URLs have changed to include en/ 2013-09-13 11:23:37 +02:00
Clinton Gormley 9f59a85c26 Removed .settings from .gitignore - @jpountz intended
for it to be included to ensure consistent code styles
between eclipse and IDEA. Instead just ignore
the org.eclipse.m2e preferences
2013-09-13 09:29:06 +02:00
Igor Motov 714aaa40ea CompletionFieldMapper should use index name instead of full name
Fixes #3669
2013-09-12 17:39:03 -04:00
Simon Willnauer 507b6a6e8c Fix several places where resources are not closed
This commit adds a test that checks that we are closing
all files even if there are random IOExceptions happening. The test
found several places where due to IOExceptions streams were not
closed due to unsufficient exception handling.
2013-09-12 23:24:27 +02:00
Luca Cavanna 439413c626 Introduced common test methods in MatchedQueriesTests (e.g. createIndex, ensureGreen, refresh, assertHitCount) 2013-09-12 21:03:33 +02:00
Luca Cavanna 3a5b325b23 Added specific log level to check which shards were refreshed and which shards we searched on 2013-09-12 19:53:59 +02:00
Clinton Gormley d6ecdecc19 [DOCS] Deprecated the from/to/include_lower/include_upper params
in the range query, range filter and numeric range filter.
Better to use gt/gte/lt/lte as they are explicit.
2013-09-12 15:07:36 +02:00
David Pilato 169cd007b5 Fix typo
Thanks to @ybonnel for finding it ;-)
2013-09-12 11:00:59 +02:00
Martijn van Groningen 8ddb809f98 If all scroll ids should be removed then the `_all` value should be used instead of not specifying any scroll ids. 2013-09-12 10:41:38 +02:00
Martijn van Groningen 1fe72dcf56 Moved to use assertHitCount instead of just checking the total count 2013-09-12 10:25:42 +02:00
Martijn van Groningen d3aacba6c6 Set log level to trace for package action.support.broadcast in the RecoveryPercolatorTests#testSinglePercolator_recovery test. 2013-09-12 10:19:10 +02:00
Simon Willnauer fddb7420ae Add support for Lucene's MockDirectoryWrapper
MockDirectoryWrapper adds asserting logic to the low level directory
implementation that helps to track and catch resource leaks like
unclosed index inputs caused by dangling IndexReader or IndexSearcher
instances. It prevents double writes to files and allows low level
random exceptions to be thrown for testing index consistency etc.

Closes #3654
2013-09-11 22:47:34 +02:00
Simon Willnauer 0e936c99e3 Add -Dtests.integration support to pom.xml 2013-09-11 22:16:43 +02:00
Simon Willnauer c2675bac50 Added 'IntegrationTests' annotation to filter integration tests
Tests now support ignoring integartion tests by passing
'-Dtests.integration=false' to the test runner either via IDE or
maven to only run fast unittests.
2013-09-11 22:12:38 +02:00
Luca Cavanna ff54cba807 fixed typo in javadoc 2013-09-11 21:00:53 +02:00
Andrew Raines 6c9542d967 Fix misspellings. 2013-09-11 13:49:33 -05:00
Andrew Raines 7425b85b0b Collapse test.{unit,integration} into org.elasticsearch. 2013-09-11 12:49:49 -05:00
David Pilato b5c9807ba2 Reverting change in bin/plugin due to d3980ee184f11efcbd2b38421f4946de9198fe20 commit 2013-09-11 16:34:08 +02:00
Shay Banon bbce6e8588 Rare race condition when introducing new fields into a mapping
Dynamic mapping allow to dynamically introduce new fields into an existing mapping. There is a (pretty rare) race condition, where a new field/object being introduced will not be immediately visible for another document that introduces it at the same time.

closes #3667, closes #3544
2013-09-11 07:08:57 -07:00
Luca Cavanna 012797a82c Loggers#getLogger static method to take into account the logger prefix
Improved LoggingListener (which reads and applies @TestLogging annotation) to take into account the logger prefix. We can now use the @TestLogging annotation and specify either the whole package name (e.g. o.e.action.metadata) or only the package name without the logger prefix (action.metadata), the custom log level will be properly applied in both cases
2013-09-11 16:04:08 +02:00
Luca Cavanna daedf853a0 Removed logger prefixes when using @TestLogging annotation 2013-09-11 11:24:07 +02:00