Commit Graph

18750 Commits

Author SHA1 Message Date
Jason Tedor 386d2ab86a More tightening of shard state action tests
This commit adds some additional assertions that test success is not
falsely indicated by adding assertions that success / failure methods
are not incorrectly invoked in failure / success scenarios.
2016-01-17 10:36:24 -05:00
Jason Tedor cf3c0ed049 Sanity assertion that exception cause is not null
This commit adds a sanity assertion that the cause of a transport
exception when sending a shard failure is not null.
2016-01-15 16:52:04 -05:00
Jason Tedor 7eefcbbeed Add retry loop in shard state action tests
This commit enhances the master channel exception test in
o.e.c.a.s.ShardStateActionTests to test that a retries loop as expected
when requests to the master repeatedly fail.
2016-01-15 11:26:32 -05:00
Jason Tedor fe39d11c55 Logging in shard state action
This commit adds a trace log on a cluster state update while waiting for
a new master, and changes the log level on cluster service close to the
warn level.
2016-01-15 09:45:39 -05:00
Jason Tedor efb142613f Tighten shard state action tests
This commit tightens the tests in o.e.c.a.s.ShardStateActionTests:
 - adds a simple test for a success condition that validates the shard
   failed request is correct and sent to the correct place
 - remove redundant assertions from the no master and master left tests
 - an assertion that success is not falsely indicated in the case of a
   unhandled error
2016-01-15 09:28:25 -05:00
Jason Tedor 7f78d52c72 Use capture and clear convenience method 2016-01-14 16:51:36 -05:00
Jason Tedor 8f67dcc348 Add Javadocs for exceptions that are handled by ShardStateAction 2016-01-14 15:07:17 -05:00
Jason Tedor 5a5d7881ed Remove dead field in o.e.c.a.s.ShardStateActionTests 2016-01-14 15:07:17 -05:00
Jason Tedor d55c5f6c4d Handle FailedToCommitClusterStateException in ShardStateAction
This commit adds Discovery.FailedToCommitClusterStateException to the
list of channel failures that ShardStateAction handles and retries.
2016-01-14 15:07:17 -05:00
Jason Tedor f17f9a5f36 Remove timeout mechanism from ShardStateAction
This commit removes the timeout retry mechanism from ShardStateAction
allowing it to instead be handled by the general master channel retry
mechanism. The idea is that if there is a network issue, the master will
miss a ping timeout causing the channel to be closed which will expose
itself via a NodeDisconnectedException. At this point, we can just wait
for a new master and retry, as with any other master channel exception.
2016-01-14 15:07:16 -05:00
Jason Tedor f49435c78b Centrally handle channel failures when failing a shard
This commit moves the handling of channel failures when failing a shard
to o.e.c.a.s.ShardStateAction. This means that shard failure requests
that timeout or occur when there is no master or the master leaves after
the request is sent will now be retried from here. The listener for a
shard failed request will now only be notified upon successful
completion of the shard failed request, or when a catastrophic
non-channel failure occurs.
2016-01-14 15:07:16 -05:00
Jason Tedor 58c2a3b687 Add simulation of master leaving in TransportReplicationActionTests
This commit adds a simulation of the master leaving after a shard
failure request has been sent. In this case, after a new cluster state
is published (simulating a new master having been elected), the request
to fail the shard should be retried.
2016-01-14 15:05:46 -05:00
Jason Tedor 703ff2b5ab Wait for new master when failing shard
This commit handles the situation when we are failing a shard and either
no master is known, or the known master left while failing the shard. We
handle this situation by waiting for a new master to be reelected, and
then sending the shard failed request to the new master.
2016-01-14 15:05:46 -05:00
Kiyan 120210d024 Fix file descriptor endpoint in configuration docs
The endpoint /_nodes/process does not show file descriptors, should be
/_nodes/stats/process.

Closes #16000
2016-01-14 14:33:22 -05:00
Jason Tedor a954e4e8e5 Safely notify cluster state task executor of publish 2016-01-14 10:07:08 -05:00
Christoph Büscher 3d98756e64 Merge branch 'refactor/rescore-builder-equals-hash' 2016-01-14 15:40:34 +01:00
Christoph Büscher 76192024a8 Make RescoreBuilder and nested QueryRescorer Writable
Adding serialization capabilities to RescoreBuilder and make
all QueryRescorer implement NamedWritable, also requiring
all implementations of RescoreBuilder.Rescorer to implement
equals() and hashCode.

In addition, the current rescore mode enumeration is pulled out to a
separate class to make sharing of constants easier between
the query builders XContent rendering coder and the parser.
2016-01-14 15:26:18 +01:00
Luca Cavanna 1cb1607c29 Merge pull request #15954 from javanna/enhancement/get_alias_expand_closed
make get alias expand to open and closed indices by default
2016-01-14 14:24:40 +01:00
Simon Willnauer 4bef475985 [TEST] Add test to show how to parse an enum from a string in ObjectParser.java 2016-01-14 14:20:33 +01:00
Clinton Gormley 9a89a33643 Merge pull request #15984 from pdudits/patch-1
Fix incorrect file-based example in script_fields
2016-01-14 14:17:31 +01:00
David Pilato 5c9bc37450 Merge branch 'pr/azure-repo-no-secondary' 2016-01-14 14:06:30 +01:00
David Pilato ed45ad6327 Fix Azure repository with only one primary account
Using a single azure account is now rejected.
This commit fixes this issue and adds a test for it.

This regression was introduced with #13779. Hopefully no elasticsearch version has been released since then.

Needs to be merged in 2.2, 2.x and master branches.
2016-01-14 13:50:02 +01:00
Simon Willnauer 01989eb426 Merge pull request #15977 from s1monw/trash_flush_on_close_setting
Remove index.flush_on_close entirely
2016-01-14 12:54:05 +01:00
javanna 07a82d0c09 make get alias expand to open and closed indices by default
This change affects get alias, get aliases as well as cat aliases. They all return closed indices too by default. get alias and get aliases also allow to return open indices only through the `expand_wildcards` option (set it to `open`).

Closes #14982
2016-01-14 10:40:31 +01:00
Simon Willnauer aaf7e55c5f Remove index.flush_on_close entirely
This undocumented setting was mainly used for testing and a safety net for
a new flushOnClose feature back in 1.x. We can now safely remove this setting.
The test usage now uses a mock plugin setting to achive the same.
2016-01-14 10:34:58 +01:00
Daniel Mitterdorfer dc51dd0056 Add more logging to wait condition for elasticsearch nodes in tests 2016-01-14 09:48:27 +01:00
Clinton Gormley b1ee074921 Document that bool.filter assigns scores of 1.0 2016-01-14 09:28:32 +01:00
Jason Tedor d5e20fb763 Merge pull request #15934 from jasontedor/freebsd-load-average
Add load averages to OS stats on FreeBSD

Closes #15917
2016-01-13 20:11:22 -05:00
Simon Willnauer 1ddfa42c2e Merge pull request #15966 from s1monw/randomize_mock_plugins
Randomize which MockPlugins are used for IT
2016-01-13 23:58:49 +01:00
Simon Willnauer 22834bce55 fix possible race in IndexServiceTests#testBaseAsyncTask and add mock plugin SearchWithRandomIOExceptionsIT 2016-01-13 23:39:25 +01:00
Simon Willnauer e849674f5c add required plugin to PrimaryAllocationIT 2016-01-13 23:11:35 +01:00
Simon Willnauer 4526f117a2 Randomize which MockPlugins are used for IT 2016-01-13 23:00:59 +01:00
Simon Willnauer 8c10616df8 Merge pull request #15964 from s1monw/flush_on_close_final
Remove updatability of `index.flush_on_close`
2016-01-13 22:55:26 +01:00
Jason Tedor 4b47c38922 Fix typo in comment in o/e/c/c/Cache.java 2016-01-13 15:01:59 -05:00
Simon Willnauer 24b0f1f025 Remove updateability of `index.flush_on_close`
`index.flush_on_close` is a test setting and doesn't need to be updateable.

Relates to #15955
2016-01-13 20:39:07 +01:00
Simon Willnauer b333133183 Merge pull request #15955 from s1monw/move_settings_to_index_level
Move all dynamic settings and their config classes to the index level
2016-01-13 20:35:33 +01:00
Ryan Schneider c42149ebe2 merge PR 14212 - add "Best Practices" section to the cloud-aws docs 2016-01-13 11:01:24 -08:00
Adrien Grand aa52ab365a Merge pull request #15958 from jpountz/fix/remove_dead_fielddata_code
Remove dead fielddata code.
2016-01-13 18:33:35 +01:00
Yannick Welsch eeb552b3a5 Merge pull request #15852 from ywelsch/fix/doc-tribe
Fix tribe blocks documentation
2016-01-13 18:06:05 +01:00
Yannick Welsch e045dae10b Fix tribe blocks documentation
Closes #15852
2016-01-13 18:05:13 +01:00
Britta Weber 87f0edbf51 Merge pull request #15952 from brwe/fix-cicular-reference-exception
Avoid circular reference in exception
2016-01-13 16:28:04 +01:00
Britta Weber 0c08d796c5 assert before we set the suppressed 2016-01-13 16:27:26 +01:00
Britta Weber e0edb07cc6 disable testCreateAndDeleteIndexConcurrently, it is flaky and we have an issue for it 2016-01-13 16:21:58 +01:00
Adrien Grand 08d05b201e Remove dead fielddata code.
This became dead when we removed in-memory fielddata for numeric fields.
2016-01-13 16:09:50 +01:00
Martijn van Groningen a7a45cd941 test: ensure that no percolate request are executed when stopping a node 2016-01-13 15:45:28 +01:00
Nik Everett b7cb04cbf4 Merge pull request #15809 from nik9000/unraw
Remove some raw from ActionRequest subclasses
2016-01-13 09:43:57 -05:00
Nik Everett df44754605 Renames Self to Request in ActionRequests 2016-01-13 09:40:32 -05:00
Simon Willnauer 437d7c179a Move all dynamic settings and their config classes to the index level
Today we maintain a lot of settings on the shard level which are all index level settings.
In order to cut over to the new settings API where we register update listener we have to move
all of them on to the index level otherwise we need a way to un-register listeners which is error-prone
and requires additional handling when shards are closed. It's simpler and also more accurate to handle all of
them on the index level where we can trash the entire registry for update listener once the index goes out of scope.
2016-01-13 14:25:37 +01:00
Britta Weber 2c2264d8d0 Avoid circular reference in exception
Don't set the suppressed Exception in Translog.closeOnTragicEvent(Exception ex) if it is an
AlreadyClosedException. ACE is thrown by the TranslogWriter and as cause might
contain the Exception that we add the suppressed ACE to. We then end up with a
circular reference where Exception A has a suppressed Exception B that has as cause A.
This would cause a stackoverflow when we try to serialize it.
For a more detailed description see #15941

closes #15941
2016-01-13 13:56:04 +01:00
Simon Willnauer 13c0b1932b Merge pull request #15933 from s1monw/move_refresh_into_index_service
Move RefreshTask into IndexService and use since task per index
2016-01-13 13:19:24 +01:00