Commit Graph

18141 Commits

Author SHA1 Message Date
Jason Tedor 89c960b00a Merge pull request #15428 from jasontedor/cluster-state-batch-logging
Explicitly log cluster state update failures
2015-12-16 10:55:14 -05:00
Jason Tedor 02354fc491 More useful assertions in o.e.c.s.InternalClusterService 2015-12-16 10:53:59 -05:00
Jason Tedor 3e8768f9ee Merge pull request #15468 from jasontedor/master-side-of-wait-on-shard-failures
Master should wait on cluster state publication when failing a shard
2015-12-16 10:39:38 -05:00
Jason Tedor 89a09b9bed Master should wait on cluster state publication when failing a shard
When a client sends a request to fail a shard to the master, the current
behavior is that the master will submit the cluster state update task
and then immediately send a successful response back to the client;
additionally, if there are any failures while processing the cluster
state update task to fail the shard, then the client will never be
notified of these failures.

This commit modifies the master behavior when handling requests to fail
a shard. In particular, the master will now wait until successful
publication of the cluster state update before notifying the request
client that the shard is marked as failed; additionally, the client is
now notified of any failures during the execution of the cluster state
update task.

Relates #14252
2015-12-16 10:37:51 -05:00
Jason Tedor 44467df353 Merge pull request #15456 from jasontedor/reorganize-shard-state-action
Reorganize o/e/c/a/s/ShardStateAction.java
2015-12-16 07:37:10 -05:00
Clinton Gormley 4597a22ace Merge pull request #15473 from jmluy/patch-1
Update sample in sort for consistency
2015-12-16 12:53:09 +01:00
Simon Willnauer e83c728265 Merge pull request #15475 from s1monw/beef_up_translog_tests
Beef up TranslogTests with concurrent fatal exceptions test
2015-12-16 12:43:56 +01:00
Simon Willnauer e5dc124811 apply review from @bleskes 2015-12-16 12:27:07 +01:00
Jason Tedor e084e50edb Merge pull request #15461 from jasontedor/cleanup-routing-nodes
Cleanup o/e/c/r/RoutingNodes.java
2015-12-16 06:21:01 -05:00
Britta Weber 7a469538bc serialize os name, arch and version too
These three properties are build in the jason response but were not
transported when a node sends the response.

closes #15422
2015-12-16 11:24:11 +01:00
Simon Willnauer 34703a838d Beef up TranslogTests with concurrent fatal exceptions test
Today we only test this when writing sequentially. Yet, in practice we mainly
write concurrently, this commit adds a test that tests that concurrent writes with
sudden fatal failure will not corrupt our translog.

Relates to #15420
2015-12-16 10:25:10 +01:00
Martijn van Groningen 082632dcac aggs: fixed bug in children agg that prevented all child docs from being evaluated
Before we only evaluated segments that yielded matches in parent aggs, which caused us to miss to evaluate child docs in segments we didn't have parent matches for.

The fix for this is stop remember in what segments we have matches for and simply evaluate all segments. This makes the code simpler and we can still quickly see if a segment doesn't hold child docs like we did before.
2015-12-16 10:16:18 +01:00
Jason Tedor 36bd845090 Reorganize o/e/c/a/s/ShardStateAction.java
This commit is a trivial reorganization of
o/e/c/a/s/ShardStateAction.java. The primary motive is have all of the
shard failure handling grouped together, and all of the shard started
handling grouped together.
2015-12-15 22:40:31 -05:00
Jason Tedor d24c83b690 Cleanup o/e/c/r/RoutingNodes.java
This commit applies a few trivial cleanups to o/e/c/r/RoutingNodes.java.
2015-12-15 17:43:38 -05:00
soinlv 015ead0c45 Remove unused import
Closes #15458
2015-12-15 16:31:58 -05:00
Adrien Grand 82a64fd2f8 Fix SearchWhileRelocatingIT so that the type of the mapping matches the type of documents. 2015-12-15 17:22:04 +01:00
Boaz Leskes 6a7fc8fb32 IndexService: format and remove unneeded import 2015-12-15 17:10:32 +01:00
Lee Hinman 68bbb6c02c Merge remote-tracking branch 'dakrone/log-rest-headers' 2015-12-15 08:52:52 -07:00
Lee Hinman 91b55ded6a Trace log REST test headers 2015-12-15 08:48:43 -07:00
Costin Leau 210657a453 [DOC] escape # in programlisting 2015-12-15 16:44:27 +02:00
Boaz Leskes 3978508a29 Merge pull request #15443 from bleskes/inject_remove
IndexService: remove unneed inject annotation
2015-12-15 15:33:50 +01:00
Boaz Leskes 07044e02b9 IndexService: remove unneed inject annotation from 2015-12-15 15:25:17 +01:00
umeku 0ce88b5887 Fix inaccurate docs for nested datatype
Closes #15436
2015-12-15 15:15:00 +01:00
Adrien Grand c7bcb32ae6 Merge pull request #15442 from jpountz/remove/back_compat_path
Remove back compat for the `path` option.
2015-12-15 15:04:04 +01:00
Adrien Grand d94bba2d9c Remove back compat for the `path` option.
The `path` option allowed to index/store a field `a.b.c` under just `c` when
set to `just_name`. This "feature" has been removed in 2.0 in favor of `copy_to`
so we can remove the back compat in 3.x.
2015-12-15 14:55:23 +01:00
Costin Leau 4426ed0a09 [DOCS] Link docs on repository-hdfs plugin
relates #15191
2015-12-15 14:52:36 +02:00
Clinton Gormley 82eb498b29 Docs: Updated plugin author help for Gradle
Relates to #15280
2015-12-15 12:27:47 +01:00
Jim Ferenczi 715528a567 Merge pull request #15393 from jimferenczi/terms_agg_getKeyAsString
getKeyAsString and key_as_string should be the same for terms aggregation.
2015-12-15 12:11:23 +01:00
Jim Ferenczi 76713611e9 Format the term with the formatter in LongTerms.Bucket.getKeyAsString in order to be consistent
with the json response field `key_as_string` of the terms aggregation.
2015-12-15 12:10:06 +01:00
Clinton Gormley 061446b25a Merge pull request #15304 from cjohansen/patch-1
Fix typo
2015-12-15 10:57:38 +01:00
Adrien Grand c40099d4ef Merge pull request #15243 from jpountz/fix/field_uniqueness
Validate that fields are defined only once.
2015-12-15 10:38:47 +01:00
Adrien Grand 5d5c6591aa Validate that fields are defined only once.
There are two ways that a field can be defined twice:
 - by reusing the name of a meta mapper in the root object (`_id`, `_routing`,
   etc.)
 - by defining a sub-field both explicitly in the mapping and through the code
   in a field mapper (like ExternalMapper does)

This commit adds new checks in order to make sure this never happens.

Close #15057
2015-12-15 10:37:18 +01:00
Adrien Grand 7473905620 Merge pull request #15313 from jpountz/fix/immutable_mappings
Make mappings immutable.
2015-12-15 10:23:34 +01:00
Adrien Grand 50eeafa75c Make mappings immutable.
Today mappings are mutable because of two APIs:
 - Mapper.merge, which expects changes to be performed in-place
 - IncludeInAll, which allows to change whether values should be put in the
   `_all` field in place.

This commit changes both APIs to return a modified copy instead of modifying in
place so that mappings can be immutable. For now, only the type-level object is
immutable, but in the future we can imagine making them immutable at the
index-level so that mapping updates could be completely atomic at the index
level.

Close #9365
2015-12-15 10:20:28 +01:00
Martijn van Groningen ec908ddfd6 Use transport service to handle RetryOnReplicaException and execute replica action on the current node.
Transport service will delegate to threadpool internally.
2015-12-15 09:32:58 +01:00
Robert Muir 5f7b863067 Merge pull request #15433 from rmuir/who_tests_the_tester
smoke test plugins does not test any plugins
2015-12-15 01:11:27 -05:00
Robert Muir 2d42e99c7a smoke test plugins does not test any plugins
Currently the build has a bug and it loads 0 plugins.
2015-12-15 00:05:14 -05:00
Jason Tedor ffdda793a0 Merge pull request #15429 from jasontedor/intellij-type-inference
Fix IntelliJ query builder type inference issues
2015-12-14 19:35:31 -05:00
Jason Tedor 2e721a0328 Fix IntelliJ query builder type inference issues
This commit addresses two type inference issues that the IntelliJ source
editor struggles with when registering query builder prototypes in
o/e/i/q/IndicesQueriesRegistry.java and
o/e/i/q/f/ScoreFunctionParserMapper.java.
2015-12-14 18:54:35 -05:00
Jason Tedor d64baf0f30 Explicitly log cluster state update failures
This commit adds explicit logging at the DEBUG level for cluster state
update failures. Currently this responsibility is left to the cluster
state task listener, but we should expliclty log these with a generic
message to address cases where the listener might not.

Relates #14899, relates #15016, relates #15023
2015-12-14 17:20:22 -05:00
Jason Tedor 1f0c23a21d Merge pull request #14950 from jasontedor/trace-log-shard-not-available-exceptions
Only trace log shard not available exceptions
2015-12-14 16:20:47 -05:00
Jason Tedor 6b39ff6081 Only trace log shard not available exceptions
This commit changes the behavior of the logging in
TransportBroadcastByNodeAction#onNodeFailure to only trace log
exceptions that are considered shard-not-available exceptions. This
makes the logging consistent with how these exceptions are handled in
the response.

Relates #14927
2015-12-14 16:20:13 -05:00
Costin Leau 7bca97bba6 HDFS Snapshot/Restore plugin
Migrated from ES-Hadoop. Contains several improvements regarding:

* Security
Takes advantage of the pluggable security in ES 2.2 and uses that in order
to grant the necessary permissions to the Hadoop libs. It relies on a
dedicated DomainCombiner to grant permissions only when needed only to the
libraries installed in the plugin folder
Add security checks for SpecialPermission/scripting and provides out of
the box permissions for the latest Hadoop 1.x (1.2.1) and 2.x (2.7.1)

* Testing
Uses a customized Local FS to perform actual integration testing of the
Hadoop stack (and thus to make sure the proper permissions and ACC blocks
are in place) however without requiring extra permissions for testing.
If needed, a MiniDFS cluster is provided (though it requires extra
permissions to bind ports)
Provides a RestIT test

* Build system
Picks the build system used in ES (still Gradle)
2015-12-14 21:50:09 +02:00
Christoph Büscher c7a001dcb4 Merge pull request #15376 from cbuescher/highlight-refactoring-searchSource
Use HighlightBuilder in SearchSourceBuilder
2015-12-14 20:35:07 +01:00
Simon Willnauer bc8745dcc2 Merge pull request #15420 from s1monw/fail_translog_on_tragic_event
Fail and close translog hard if writing to disk fails
2015-12-14 18:30:04 +01:00
Simon Willnauer 943915e05a simplify code and use members directly 2015-12-14 18:06:49 +01:00
Christoph Büscher 59bd21f24f Adding test for Order enum ordinals 2015-12-14 17:29:25 +01:00
Christoph Büscher 6f16317a4b Switch internal representation of order to enum 2015-12-14 16:56:39 +01:00
Simon Willnauer b0144c557c apply feedback from @mikemccand 2015-12-14 16:09:20 +01:00
Christoph Büscher 659bab7105 Use HighlightBuilder in SearchSourceBuilder
After HighlightBuilder implements Writable now, we can remove
the temporary solution for transporting the highlight section in
SearchSourceBuilder from the coordinating node to the shard as
BytesReference and use HighlightBuilder instead.
2015-12-14 15:20:49 +01:00