Commit Graph

24765 Commits

Author SHA1 Message Date
Ryan Ernst 31de1fa914 Remove old release scripts (#21005)
These scripts are no longer used now that we have the unified release
process.
2016-10-18 14:57:02 -07:00
Boaz Leskes c3987156ab Remove local discovery in favor of a simpler `MockZenPings` (#20960)
`LocalDiscovery` is a discovery implementation that uses static in memory maps to keep track of current live nodes. This is used extensively in our tests in order to speed up cluster formation (i.e., shortcut the 3 second ping period used by `ZenDiscovery` by default). This is sad as that mean that most of the test run using a different discovery semantics than what is used in production. Instead of replacing the entire discovery logic, we can use a similar approach to only shortcut the pinging components.
2016-10-18 21:12:15 +02:00
Ryan Ernst dca614aa3b Build: Change `gradle run` to use zip distribution (#21001)
When running `gradle run`, a developer usually intends to get a running
instance as if they had run elasticsearch from the command line. This is
different than the isolated environment we use for integration testing
plugins. This change switches the run task to use the zip distribution,
so that all modules included in the normal distribution are included.
2016-10-18 11:48:58 -07:00
Chris Earle c2894d2362 Add missing '// CONSOLE' to code snippet 2016-10-18 12:57:03 -04:00
Chris Earle 9cf7214380 [DOCS] Add "version" to template and pipeline docs (#20407)
* [DOCS] Add "version" to template and pipeline docs

This adds details about the "version" to both the template and pipeline pages.
2016-10-18 11:56:18 -04:00
Lee Hinman 2f01f65e1a Add rudimentary logstash and beats template BWC tests (#20588)
This tests that the templates shipped with 5.0 versions of Logstash and
Beats still work on an Elasticsearch 6.0+ node, so that we ensure that
ES can be upgraded prior to upgrading tools dependent on it.

Related to #20491
Resolves #17275
2016-10-18 09:49:09 -06:00
Lee Hinman c1721c6d79 Only negate index expression on all indices with preceding wildcard (#20898)
* Only negate index expression on all indices with preceding wildcard

There is currently a very confusing behavior in Elasticsearch for the
following:

Given the indices: `[test1, test2, -foo1, -foo2]`

```
DELETE /-foo*
```

Will cause the `test1` and `test2` indices to be deleted, when what is
usually intended is to delete the `-foo1` and `-foo2` indices.

Previously we added a change in #20033 to disallow creating indices
starting with `-` or `+`, which will help with this situation. However,
users may have existing indices starting with these characters.

This changes the negation to only take effect in a wildcard (`*`) has
been seen somewhere in the expression, so in order to delete `-foo1` and
`-foo2` the following now works:

```
DELETE /-foo*
```

As well as:

```
DELETE /-foo1,-foo2
```

so in order to actually delete everything except for the "foo" indices
(ie, `test1` and `test2`) a user would now issue:

```
DELETE /*,--foo*
```

Relates to #19800
2016-10-18 17:24:22 +02:00
Jason Tedor 9bb8bd0578 Fix typo in param. name in TransportService method
This commit fixes a typo in a parameter name for the
TransportService#setTracerLogExclude method.

Relates #20970
2016-10-18 10:07:57 -04:00
Fanfan d30de66949 tracelLogExclude to tracerLogExclude (#20970)
fix a variable name for misspelling "tracerLogExclude" to "tracelLogExclude"
2016-10-18 14:22:41 +02:00
Boaz Leskes ba6f759f58 ClusterState publishing shouldn't trigger circuit breakers (#20986)
Updating the circuit breaker settings (and other settings) should always be possible, even if the cluster is under stress. With #20827 we updated the cluster settings request to not trigger circuit breakers. However that change is not complete since the resulting cluster state can potentially not be published. This change makes sure cluster state publishing to not trigger circuit breakers as well.

Relates to #20960 where this was discovered.
2016-10-18 12:57:07 +02:00
Christoph Büscher 274d5d1fdb Remove org.junit.rules.ExpectedException from forbidden-apis again 2016-10-18 11:13:09 +02:00
Christoph Büscher abff485d68 Use Lucenes expectThrows() when testing exceptions
Cleaning up a few remaining occurences of using junits ExpectedException rule in
favor of using LuceneTestCase#expectThrows() which is more concise and versatile.
2016-10-18 10:34:48 +02:00
Joshua Rich 8133c5e85d Merge pull request #20958 from joshuar/joshuar-docs/clearer-shard-allocation-filtering
Docs: Cluster Allocation Filtering
2016-10-18 14:24:41 +11:00
Joshua Rich cdb156e691 Merge pull request #20794 from joshuar/doc/fix_highlighter_ambiguities
[DOCS] Use a better name for fields in examples to avoid ambiguity
2016-10-18 14:23:27 +11:00
Ryan Ernst e57720e091 Fix test to check for boolean instead of integer for boolean field 2016-10-17 12:31:54 -07:00
Christoph Büscher c63c5fa3f2 Use expectThrows() instead of try-catch blocks for testing expected exceptions 2016-10-17 21:06:29 +02:00
Ryan Ernst 3d3dd7185d Add support for booleans in scripts (#20950)
* Scripting: Add support for booleans in scripts

Since 2.0, booleans have been represented as numeric fields (longs).
However, in scripts, this is odd, since you expect doing a comparison
against a boolean to work. While languages like groovy will auto convert
between booleans and longs, painless does not.

This changes the doc values accessor for boolean fields in scripts to
return Boolean objects instead of Long objects.

closes #20949

* Make Booleans final and remove wrapping of `this` for getValues()
2016-10-17 11:11:42 -07:00
Clinton Gormley 5ec2ba3166 Update scripted-metric-aggregation.asciidoc
Removed docs for `reduce_params`

Closes #20917
2016-10-17 19:31:30 +02:00
David Pilato 1be7bdf721 Merge pull request #20975 from zhenxing914/2.3
node.client() should not be used in the documentation
2016-10-17 18:28:57 +02:00
Clinton Gormley 718a86e256 Added missing POST method to create.json REST spec
Relates to #20924
2016-10-17 17:58:31 +02:00
Clinton Gormley 42458e836a Add a REST spec for the create API (#20924)
The create request now requires that an ID be present.
Currently the clients hard code a create method, but
we should just add a create REST spec so this method
can be autogenerated.
2016-10-17 17:57:25 +02:00
Clinton Gormley 43ad8de75b Fixed typo in index rollover docs
Closes #20935
2016-10-17 17:56:54 +02:00
Jason Tedor 96aa5e33ce Fix slowlog docs
This commit fixes two issues with the slow log docs:
 - clarifies that these settings are per index
 - updates index slow log configuration for Log4j 2

Relates #20976
2016-10-17 10:50:32 -04:00
Quinn Shanahan 1bef6c7fee Update regexp-syntax.asciidoc (#20973) 2016-10-17 16:32:17 +02:00
Dimitrios Liappis b0bb72ccd7 Deprecate EOL'ed Ubuntu 15.04 from Vagrantfile
* Deprecate EOL'ed Ubuntu 15.04 from Vagrantfile

Relates pr #20921
2016-10-17 17:27:01 +03:00
Tanguy Leroux 1755cc08f3 REST API parser should fail on duplicate params/paths/methods/parts (#20940)
This commit changes the current REST API parser to make it fail and throw an exception when a REST specification file contains a duplicated parameters, or path, or method, or path part.
2016-10-17 09:19:07 +02:00
Joshua Rich 63f484ffa3 Docs: Cluster Allocation Filtering
Put more emphasis on the fact that multiple values can be specified
and move examples after explanation of settings.
2016-10-17 11:02:33 +11:00
Jason Tedor c1bdaaf80f Fix connection keep-alive header handling
This commit fixes an issue with the handling of the value "keep-alive"
on the Connection header in the Netty 4 HTTP implementation while
handling an HTTP 1.0 request. The issue was using the wrong equals
method to compare an AsciiString instance and a String instance (they
could never be equal). This commit fixes this to use the correct equals
method to compare for content equality.
2016-10-16 19:51:00 -04:00
Jason Tedor cd5777593a Fix connection close header handling
This commit fixes an issue with the handling of the value "close" on the
Connection header in the Netty 4 HTTP implementation. The issue was
using the wrong equals method to compare an AsciiString instance and a
String instance (they could never be equal). This commit fixes this to
use the correct equals method to compare for content equality.

Relates #20956
2016-10-16 13:18:09 -04:00
Clinton Gormley 8d602c6692 Updated REST test README to include required params when running tests 2016-10-16 13:25:25 +02:00
Simon Willnauer 5137f44bd6 [TEST] return empty array if AbstractQueryTestCase#currentTypes is null
This is important to allow any test to use RandomQueryBuilder#createQuery()
since some of the query builders that are used in this test test the length
of the types array and otherwise will thow NPE if the test is not a subclass
of AbstractQueryTestCase.
2016-10-15 14:46:54 +02:00
Jason Tedor 5a03eb91e6 Add precise logging on unknown or invalid settings
Today when logging an unknown or invalid setting, the log message does
not contain the source. This means that if we are archiving such a
setting, we do not specify where the setting is from (an index, and
which index, or a persistent or transient cluster setting). This commit
provides such logging for the end user can better understand the
consequences of the unknown or invalid setting.

Relates #20951
2016-10-14 23:55:15 -04:00
Jason Tedor f23ae90d92 Fix logging configuration for AwsSdkMetrics logger
This commit fixes an issue with the configuration for the AwsSdkMetrics
logger; the issue is that the logging configuration had used underscores
instead of periods for the settings key (the perils of lenient settings
parsing).

Relates #20313
2016-10-14 23:44:39 -04:00
Christoph Büscher 289a69bf68 Use ObjectParser in ScriptSortBuilder 2016-10-14 20:19:21 +02:00
Christoph Büscher 1b78618106 Use ObjectParser in ScoreSortBuilder and FieldSortBuilder 2016-10-14 20:19:21 +02:00
Nik Everett 4fbe1a8819 CONSOLEify _cat/pending_tasks docs
Relates to #18160
2016-10-14 14:12:35 -04:00
Jun Ohtani dd4ff9b0a7 Merge pull request #20904 from johtani/remove_nullable_in_mapper_builder_context
IndexSettings should not be Null in Mapper.BuildContext
2016-10-14 23:51:20 +09:00
Jason Tedor 370253f95a Add doc note regarding processors bound
This commit expands the thread pool docs regarding the processor
setting.

Relates #20895
2016-10-14 10:32:31 -04:00
Simon Willnauer cff5993318 Parse alias filters on the coordinating node (#20916)
Today we don't parse alias filters on the coordinating node, we only forward
the alias patters to executing node and resolve it late. This has several problems
like requests that go through filtered aliases are never cached if they use date math,
since the parsing happens very late in the process even without rewriting. It also used
to be processed on every shard while we can only do it once per index on the coordinating node.
Another nice side-effect is that we are never prone to cluster-state updates that change an alias,
all nodes will execute the exact same alias filter since they are process based on the same
cluster state.
2016-10-14 16:26:09 +02:00
Jun Ohtani ddced5df1a IndexSettings should not be Null in Mapper.BuildContext
Rename method name
Change validation

Closes #20174
2016-10-14 22:01:31 +09:00
Tanguy Leroux aabbbc2202 Remove duplicate timeout parameter in Delete/Update-By-Query REST Specs (#20934)
This commit removes the duplicated "timeout" parameter introduced in #20915
2016-10-14 13:21:39 +02:00
Jason Tedor 595ec8c948 Remove artificial default processors limit
Today Elasticsearch limits the number of processors used in computing
thread counts to 32. This was from a time when Elasticsearch created
more threads than it does now and users would run into out of memory
errors. It appears the real cause of these out of memory errors was not
well understood (it's often due to ulimit settings) and so users were
left hitting these out of memory errors on boxes with high core
counts. Today Elasticsearch creates less threads (but still a lot) and
we have a bootstrap check in place to ensure that the relevant ulimit is
not too low.

There are some caveats still to having too many concurrent indexing
threads as it can lead to too many little segments, and it's not a
magical go faster knob if indexing is already bottlenecked by disk, but
this limitation is artificial and surprising to users and so it should
be removed.

This commit also increases the lower bound of the max processes ulimit,
to prepare for a world where Elasticsearch instances might be running
with more the previous cap of 32 processors. With the current settings,
Elasticsearch wants to create roughly 576 + 25 * p / 2 threads, where p
is the number of processors. Add in roughly 7 * p / 8 threads for the GC
threads and a fudge factor, and 4096 should cover us pretty well up to
256 cores.

Relates #20874
2016-10-14 05:47:26 -04:00
Simon Willnauer 7f7e99e10b [TEST] Add basic tests for ExplainRequest and ShardValidationQueryRequest 2016-10-14 10:06:38 +02:00
Tanguy Leroux f5e1c6d330 Update Delete/Update-By-Query REST Specs (#20915)
This commit removes unused parameters from the Update-By-Query and Delete-By-Query REST specification files.
2016-10-14 09:26:33 +02:00
Nik Everett 68ed183381 CONSOLEify a few more _cat docs
`_cat/master`, `_cat/nodeattrs`, `_cat/nodes`.
2016-10-13 16:43:06 -04:00
Simon Willnauer b2c8da25fd Remove unreleased version constant
Some people apparently never run tests when they change this file.
Neither do they read comments right below the line they change that
they should do the change after all.
2016-10-13 22:13:18 +02:00
Clinton Gormley e739ecf67c Fix version constant for 5.0.0 2016-10-13 20:42:43 +02:00
Clinton Gormley feefb71007 Renamed v5.0.0-rc2 to 5.0.0 2016-10-13 20:21:49 +02:00
Nik Everett 279baa0284 Add a flush to test in _cat/indices.asciidoc
We test that sorting by `store.size` works but sometimes the
sizes aren't what we expect. At least in CI:
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+multijob-unix-compatibility/os=opensuse/101/console
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+5.x+multijob-unix-compatibility/os=centos/100/console

I haven't been able to reproduce it locally but adding a `_flush`
won't hurt and might make the inconsistency vanish.
2016-10-13 13:21:57 -04:00
kunal642 e20d9d6478 Removed unnecessary assertion on boolean values (#20910)
* Removed unnecessary assertion on boolean values

* Reversed changes for false assertion

* corrected formatting

* reverted changes for SettingsUpdater
2016-10-13 12:12:57 -04:00