Commit Graph

22987 Commits

Author SHA1 Message Date
Robert Muir 26a73c39bf throw error if the tree is totally malformed 2016-06-20 13:01:59 -04:00
David Pilato cb8073e990 Wrong name for values field
We wrote that the document is:

```json
{
  "value" : ["foo", "bar", "baz"]
}
```

But the processor is using a `values` field:

```json
{
  "foreach" : {
    "field" : "values",
    "processors" : [
      // ...
    ]
  }
}
```

It should be `values`.
2016-06-20 18:58:41 +02:00
Nik Everett 6569d35094 Fail doc tests when any shard fails
ES only sends a non-200 response all shards fail but we should
fail the tests generated by docs if any of them fail.

Depending on the outcome of #18978 this might be a temporary
workaround.
2016-06-20 12:49:30 -04:00
Simon Willnauer 9196ff255e Add extra ctor to FilterClient to support Guice proxies
just don't ask it's bad but some plugins are so involved they need this.

Closes #the_issue_that_never_existed
2016-06-20 16:47:24 +02:00
Robert Muir 9510a8f39e add a few more tests 2016-06-20 10:46:23 -04:00
Eric Sherman 0660de7472 Update snapshots.asciidoc (#18923) 2016-06-20 16:00:59 +02:00
Simon Willnauer 5746d96f42 Catch ClosedByInterruptException when interrupting check index 2016-06-20 14:37:13 +02:00
Robert Muir 28b1b149ab remove unused import 2016-06-20 08:32:53 -04:00
Robert Muir 9111ed3e2c add docs 2016-06-20 08:24:41 -04:00
Robert Muir cd1a7b441c Improve error messages for lambdas when the number of arguments is wrong 2016-06-20 07:57:00 -04:00
Adrien Grand 93415d4506 Expose MMapDirectory.preLoad(). #18880
The MMapDirectory has a switch that allows the content of files to be loaded
into the filesystem cache upon opening. This commit exposes it with the new
`index.store.pre_load` setting.
2016-06-20 13:42:56 +02:00
Simon Willnauer 459665914b Detach BigArrays from Guice (#18973)
BigArrays can be fully constructed without Guice, this change cleans up
it's creation and the mocking in MockNode.
2016-06-20 13:18:19 +02:00
Simon Willnauer 9506f60504 Improve error message if a setting is not found (#18920)
Today we only emit that the setting wasn't found unless we have
some DYM suggestions. Yet, if a setting is not found at all and there
are no suggestions due to typos it's likely a removed setting or the plugin
that is supposed to be configured is not installed.
This commit adds some info text to the exception to help the user debugging
the problem before opening bugreports.

Instead of emitting:

`unknown setting [foo.bar]`

we now emit:

`unknown setting [foo.bar] please check the migration guide for removed settings and ensure that the plugin you are configuring is installed`

Relates to #18663
2016-06-20 13:10:35 +02:00
Boaz Leskes 0cb4e574a9 index shard should be able to cancel check index on close. (#18839)
If someone sets `index.shard.check_on_startup`, indexing start up time can be slow (by design, it diligently goes and checks all data). If for some reason the shard is closed in that time, the store ref is kept around and prevents a new shard copy to be allocated to this node via the shard level locks. This is especially tricky if the shard is close due to a cancelled recovery which may re-restart soon.

This commit adds a cancellable threads instance to each IndexShard and perform index checking underneath it, so it can be cancelled on close.
2016-06-20 12:16:22 +02:00
Simon Willnauer 1adcd52904 Merge pull request #18969 from s1monw/remove_version_module
Remove a bunch of unneeded Modules
2016-06-20 12:15:29 +02:00
Simon Willnauer e50314bb6e Remove NodeClientModule and PluginsModule 2016-06-20 11:53:07 +02:00
Simon Willnauer fb713774a1 Don't create enviroment more than once 2016-06-20 11:45:52 +02:00
Simon Willnauer cfa4689445 Share test injector creation 2016-06-20 11:38:48 +02:00
Robert Muir 4d78be5b9e remove arity restriction (as def call incorporates all lambdas and all their captures) 2016-06-20 05:37:31 -04:00
Simon Willnauer 7fea5bd8e7 Remove obsolete Modules that can simply be inlined in node creation 2016-06-20 11:28:14 +02:00
Robert Muir b53d735602 Function/Lambda parameters do not need to be lenient... 2016-06-20 05:05:34 -04:00
Simon Willnauer 260f38fd76 Remove VersionModule and use Version#current consistently.
We pretended to be able to ackt like a different version node for so long it's
time to be honest and remove this ability. It's just confusing and where needed
and tested we should build dedicated extension points.
2016-06-20 10:55:52 +02:00
Tanguy Leroux 98951b1203 Compile each Groovy script in its own classloader
closes #18572
2016-06-20 08:17:09 +02:00
Florian Hopf 6b46bf13f0 Throw if the local node is not set
This commit adds an IllegalStateException if attempting to get the local
node from the cluster service when it is not set.

Relates #18963
2016-06-19 17:25:18 -04:00
Robert Muir 92bc29266b Merge pull request #18960 from uschindler/forbiddenapis-2.2
Update forbiddenapis to 2.2
2016-06-19 17:17:45 -04:00
Uwe Schindler 5475e18ad0 Update forbiddenapis to 2.2 and fix painless tests 2016-06-19 20:40:38 +02:00
Robert Muir 8d9fa7e0b5 Fix explicit casts and improve tests. 2016-06-19 03:19:45 -04:00
Boaz Leskes 8f96dd53aa mark ESIndexLevelReplicationTestCase as abstract so it won't fail naming conventions 2016-06-18 19:39:37 +02:00
Ryan Ernst 9bbf3fc1d9 Build: Require exactly gradle 2.13
see #18935
2016-06-18 10:27:48 -07:00
Boaz Leskes 61b7f49ed2 ESIndexLevelReplicationTestCase.java fix line lengths 2016-06-18 19:13:50 +02:00
Boaz Leskes 14cd8a6794 Introduce Replication unit tests using real shards (#18930)
This commit introduce unit testing infrastructure to test replication operations using real index shards. This is infra is complementary to the full integration tests and unit testing of ReplicationOperation we already have. The new ESIndexLevelReplicationTestCase base makes it easier to test and simulate failure mode that require real shards and but do not need the full blow stack of a complete node.

The commit also add a simple "nothing is wrong" test plus a test that checks we don't drop docs during the various stages of recovery.

For now, only single doc indexing is supported but this can be easily extended in the future.
2016-06-18 18:53:47 +02:00
Boaz Leskes 535a245354 testSingleBatchSubmission - random numbers don't have to be unique 2016-06-18 18:44:54 +02:00
Simon Willnauer 4cb2bb635b Remove forked joda time BaseDateTime class (#18953)
This class was forked in 0.20 to remove a volatile keyword. While there
is no issue attached to the commit, no evidence of the criticality of the
change nor does it seem to be correct since we set this value internally as well
I think this class should be used as is from joda time even if we have to pay
the price of volatile reads. We can't do 3rd party optimization in our codebase that
way it just not maintainable.

This was added in 2280915d3c
2016-06-18 17:06:18 +02:00
Robert Muir a14ba1e5b2 Painless: add lambda captures 2016-06-18 10:23:35 -04:00
Robert Muir b0efca6473 Merge pull request #18951 from rmuir/refactor_variables
Refactor painless variables handling
2016-06-18 08:21:14 -04:00
Simon Willnauer 5c98818f48 fix compilation 2016-06-18 10:54:12 +02:00
Simon Willnauer 420dc72124 Add ClusterName#value as the default instead of it's toString method 2016-06-18 08:40:01 +02:00
Robert Muir e8826708c1 Refactor variables 2016-06-17 17:40:52 -04:00
debadair 084b35c08b Docs: Fixed code callout error. 2016-06-17 14:31:03 -07:00
Jeff Evans e9f2548ee0 Include script field even if it value is null
Include script field even if it value is null.

Closes #16408.
2016-06-17 16:41:25 -04:00
Nik Everett 1e16c22d03 Painless: move semicolon hack into lexer
Perviously we used token level lookbehind in the parser. That worked,
but only if the parser didn't have any ambiguity *at all*. Since the
parser has ambiguity it didn't work everywhere. In particular it failed
when parsing blocks in lambdas like `a -> {int b = a + 2; b * b}`.

This moves the hack from the parser into the lexer. There we can use
token lookbehind (same trick) to *insert* semicolons into the token
stream. This works much better for antlr because antlr's prediction
code can work with real tokens.

Also, the lexer is simpler than the parser, so if there is a place
to introduce a hack, that is a better place.
2016-06-17 16:18:41 -04:00
Jason Tedor d09d89f8c5 Remove only node preference
This commit removes the search preference _only_node as the same
functionality can be obtained by using the search preference
_only_nodes. This commit also adds a test that ensures that _only_nodes
will continue to support specifying node IDs.

Relates #18875
2016-06-17 15:27:46 -04:00
Jason Tedor 245def80f0 Add note that thread pool settings are node-level
This commit adds a note to the breaking changes docs that since commit
da74323141, thread pool settings are no
longer cluster-level settings and thus not dynamically updatable.
2016-06-17 15:19:52 -04:00
Areek Zillur a3bd2de430 [DOCS] fix missing rollover-index link 2016-06-17 12:14:45 -04:00
Areek Zillur 9bca264dcd Merge branch 'master' of https://github.com/elastic/elasticsearch 2016-06-17 11:41:23 -04:00
Areek Zillur 9356a6090f Merge branch 'master' into enhancement/rollover_api 2016-06-17 11:35:57 -04:00
Boaz Leskes 46b40f73b7 Inline reroute with process of node join/master election (#18938)
In the past, we had the semantics where the very first cluster state a node processed after joining could not contain shard assignment to it. This was to make sure the node cleans up local / stale shard copies before receiving new ones that might confuse it. Since then a lot of work in this area, most notably the introduction of allocation ids and #17270 . This means we don't have to be careful and just reroute in the same cluster state change where we process the join, keeping things simple and following the same pattern we have in other places.
2016-06-17 17:32:38 +02:00
David Pilato bf7a6f5509 Merge branch 'pr/update-aws-sdk'
# Conflicts:
#	plugins/repository-s3/src/main/java/org/elasticsearch/plugin/repository/s3/S3RepositoryPlugin.java
2016-06-17 17:23:12 +02:00
Jim Ferenczi fb2a48d0f0 Revert "Remove support for sorting terms aggregation by ascending count"
This is delayed after alpha4 since Kibana relies on it.
2016-06-17 17:14:01 +02:00
Simon Willnauer bdb6dcea3a Cleanup ClusterService dependencies and detached from Guice (#18941)
This change removes some unnecessary dependencies from ClusterService
and cleans up ClusterName creation. ClusterService is now not created
by guice anymore.
2016-06-17 17:07:19 +02:00