Commit Graph

3687 Commits

Author SHA1 Message Date
Boaz Leskes 4decc72da6 Fix recovery translog stats totals when recovering from store
Recovery from store fails to correctly set the translog recovery stats. This fixes it and tightens up the logic bringing it all to IndexShard (previously it was set by the recovery logic).

Closes #15974
Closes #16493
2016-02-08 11:36:59 +01:00
Simon Willnauer 7bfb1dfcc1 [TEST] Don't assert on null value. It's fine to not always see an exception in this part of the test. 2016-02-07 19:58:03 +01:00
Jason Tedor 16fe948a15 Objects#requireNonNull guard in MessageDigests 2016-02-07 11:20:53 -05:00
Jason Tedor d0c03b26f6 Fix trace logging statement in ZenDiscovery 2016-02-06 09:17:49 -05:00
Jason Tedor 542373a779 Avoid cloning MessageDigest instances
This commit modifies the MessageDigests message digest provider to
return a thread local instance of MessageDigest instances instead of
using clone since some providers do not support clone.

Closes #16479
2016-02-06 09:10:31 -05:00
Simon Willnauer b185209b63 Make IndicesWarmer a private class of IndexService
There is no need for IndicesWarmer to be a global accessible class. All it needs
access to is inside IndexService. It also doesn't need to be mutable once it's not a per node
instance. This commit move IndicesWarmer to IndexWarmer and makes the default impls like field data and
norms warming an impl detail. Also the IndexShard doesn't depend on this class anymore, instead it accepts
an Engine.Warmer as a ctor argument which delegates to the actual warmer from the index.
2016-02-05 15:24:17 +01:00
Simon Willnauer 778ec84a7c Merge pull request #16469 from s1monw/simplify_indices_field_data_cache
Simplify IndicesFieldDataCache and detach from guice
2016-02-05 14:24:19 +01:00
Simon Willnauer 9b2f40f627 Merge pull request #16471 from s1monw/no_sys_props_leaked
Apply system properties after all arguemnts are parsed in BootstrapCLIParser
2016-02-05 14:23:00 +01:00
Christoph Büscher 97172aa2fd Merge pull request #16465 from cbuescher/issue-13884-test
Tests: Add test for minimum_should_match for SimpleQueryStringQuery
2016-02-05 13:12:53 +01:00
Christoph Büscher d885fe62ea Add test for minimum_should_match, one term and multiple fields
This adds a test case similar to the issue in #13884 which was
fixed in #16155.
2016-02-05 12:33:13 +01:00
Andrej Kazakov 7f2b369dfd Use Accept header field in cat API
The cat API previously used the Content-Type header field for
determining the media type of the response. This is in opposition to the
HTTP spec which specifies the Accept header field for this purpose. This
commit replaces the use of the Content-Type header field with the Accept
header field in the cat API.

Closes #14421
2016-02-05 06:28:39 -05:00
Simon Willnauer 1e18c9a7b6 Apply system properties after all arguemnts are parsed in BootstrapCLIParser
One of our tests leaked a system property here since we failed after appling some
system properties in BootstrapCLIParser. This is not a huge deal in production since
we exit the JVM if we fail on that. Yet for correctnes we should only apply them if
we manage to parse them all.
This also caused a test failure lately on CI but on an unrelated test:
  https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+periodic/314/console
2016-02-05 11:21:00 +01:00
Simon Willnauer b5ef48ce57 fix more tests 2016-02-05 10:36:02 +01:00
Simon Willnauer 9d07501c96 fix test 2016-02-05 09:54:55 +01:00
Simon Willnauer 00be9e58f2 Simplify IndicesFieldDataCache and detach from guice
Indices level field data cacheing belongs into IndicesService and doesn't need to be
wired by guice. This commit also moves the async cache refresh out of the class into
IndicesService such that threadpool dependencies are removed and testing / creation becomes
simpler.
2016-02-05 09:43:33 +01:00
Martijn van Groningen 7a6adfd93a ingest: Added foreach processor.
This processor is useful when all elements of a json array need to be processed in the same way.
This avoids that a processor needs to be defined for each element in an array.
Also it is very likely that it is unknown how many elements are inside an json array.
2016-02-04 23:44:01 +01:00
Simon Willnauer 59a20015d6 Make TermVectorService static 2016-02-04 17:17:16 +01:00
Simon Willnauer 75802515ea Merge branch 'master' into detach_shard_from_term_vectors 2016-02-04 17:12:09 +01:00
Simon Willnauer 450ee70038 Remove DFS support from TermVector API
Retrieving distributed DF for TermVectors is beside it's esotheric justification
a very slow process and can cause serious load on the cluster. We also don't have nearly
enough testing for this stuff and given the complexity we should remove it rather than carrying it
around.
2016-02-04 16:20:24 +01:00
Yannick Welsch 15507580bb Merge pull request #16243 from ywelsch/fix/remove-shardrouting-version
Remove obsolete version in ShardRouting
2016-02-04 15:52:00 +01:00
Yannick Welsch 4937531a17 Remove obsolete version in ShardRouting
Closes #16243
2016-02-04 15:50:25 +01:00
Boaz Leskes 4cdab159f1 Remove plugability of the gateway
In the spirit of simplification, remove the ability to have a custom gateway. We haven't seen any valid use for it so far.

closes #16448
2016-02-04 15:45:05 +01:00
Boaz Leskes 924e880480 Remove `gateway.initial_meta` and always rely on min master nodes
During initial cluster forming, when  a master is elected, it reaches out to all other masters nodes and ask the last cluster state they persisted. To make sure we select the right state, we must successfully read from a `min_master_nodes` nodes. The gateway currently have specific settings to override this behavior, but I don't think they are ever used. We can drop them and reach out to the discovery layer, the single source of truth for the min master nodes settings.

Closes #16446
2016-02-04 13:42:28 +01:00
Simon Willnauer 30f569f958 Remove dependency from IndexShard on TermVectorService
This dependency is just syntactic sugar and complicates IndexShard creation.
This commit move it out where it's actually used and needed.
2016-02-04 12:55:45 +01:00
Simon Willnauer e69350f2ba Fix method visibility in SettingsModule.java 2016-02-04 11:53:06 +01:00
Simon Willnauer cb811a85da Add javadocs for SettingsModule 2016-02-04 11:49:59 +01:00
Simon Willnauer e19833171b Add more javadocs to Setting.java 2016-02-04 11:44:36 +01:00
Simon Willnauer c416b23739 Merge pull request #16445 from s1monw/filter_settings_on_node_info
Add settings filtering to node info requests
2016-02-04 11:26:04 +01:00
Simon Willnauer 26a0c72323 add test fore node info settings filtering 2016-02-04 11:15:29 +01:00
Ryan Ernst 5c0f09b03a Merge pull request #16443 from rjernst/cli_terminal
CliTool: Cleanup and document Terminal
2016-02-04 02:05:28 -08:00
Ryan Ernst e97345984d Remove format args from readText and readSecret 2016-02-04 02:03:17 -08:00
Simon Willnauer ca1a12e4c3 Add settings filtering to node info requests
Today we don't filter settings in NodeInfo so transport clients get unfiltered settings.
2016-02-04 10:45:32 +01:00
Simon Willnauer cc520b20e1 Merge branch 'master' into fix_settings_filter 2016-02-04 09:28:41 +01:00
Ryan Ernst b80200a363 CliTool: Cleanup and document Terminal
This change documents the Terminal abstraction that cli tools use, as
well as simplifies the api to be a minimal set of methods to interact
with a terminal.
2016-02-03 22:22:56 -08:00
Ryan Ernst b0ed528be8 Plugin cli: Delete temp zip file once it is unzipped 2016-02-03 20:17:42 -08:00
Nik Everett a2f07679fd Add task status
Implements a simple task status for superclasses of ReplicationRequest to
show how you can do use the status.
2016-02-03 18:21:42 -05:00
Simon Willnauer e1cf5e745d some plugins share settings - make it easy to filter them 2016-02-03 21:50:06 +01:00
Simon Willnauer 686627be5a Move ModuleTestCase into framework 2016-02-03 21:04:44 +01:00
Ali Beyad 592f5499cd More robust handling of CORS HTTP Access Control
Uses a refactored version of Netty's CORS implementation to provide more
robust cross-origin resource request functionality.  The CORS specific
Elasticsearch parameters remain the same, just the underlying
implementation has changed.

It has also been refactored in a way that allows dropping in Netty's
CORS handler as a replacement once Elasticsearch is upgraded to Netty 4.
2016-02-03 14:50:20 -05:00
Simon Willnauer e02d2e004e Rewrite SettingsFilter to be immutable
This change rewrites the entire settings filtering mechanism to be immutable.
All filters must be registered up-front in the SettingsModule. Filters that are comma-sparated are
not allowed anymore and check on registration.
This commit also adds settings filtering to the default settings recently added to ensure we don't render
filtered settings.
2016-02-03 20:05:55 +01:00
Nik Everett 5e98094db1 Remove long lines from ElasticsearchException
Mostly just wrapping the exception list.

Also:
* Reworks the docs on ElasticsearchExceptionHandle
* Removes long lines from ExceptionSerializationTests
 * Switches one method from arrow shaped to early returns
 * Adds line breaks
2016-02-03 09:33:02 -05:00
Martijn van Groningen 0d9f535044 ingest: seal all processor and processor factory implementations 2016-02-03 14:53:11 +01:00
Isabel Drost-Fromm 7d787ad1d1 Merge pull request #16411 from MaineC/test-fix/geo-sort-messy
Move non-groovy geo tests from messy tests to core
2016-02-03 14:52:01 +01:00
Simon Willnauer bac6c7c764 Remove dead code 2016-02-03 14:42:11 +01:00
Simon Willnauer 1972487deb Merge pull request #16365 from s1monw/make_settings_strict
Make settings validation strict
2016-02-03 14:29:25 +01:00
Isabel Drost-Fromm f99570b0f4 Split messy geo distance/ geo distance sorting tests.
This splits the geo distance and geo distance sorting tests marked messy:
Test cases that don't really need Groovy support are moved back to the
core test suite closer to the code they actually test.

Relates to #15178
2016-02-03 13:54:07 +01:00
Konrad Beiske 2c247e9d56 Merge pull request #16017 from beiske/xcontent_exclude
Add option to exclude based on paths in XContent
2016-02-03 13:51:49 +01:00
Simon Willnauer a77344d742 Merge branch 'master' into make_settings_strict 2016-02-03 13:21:49 +01:00
Jason Tedor eb9bdd5f8a Shard state action request logging 2016-02-03 06:56:01 -05:00
Jason Tedor 0b474c6cfc Shard state action request logging
This commit modifies the string representation of a shard state action
request. The issue being addressed is that the previous logging would
log "failure: [Unknown]" for shard started actions but this just leads
to confusion that there is a failure but its cause is unknown.

Closes #16396
2016-02-03 06:52:54 -05:00