Commit Graph

5144 Commits

Author SHA1 Message Date
Tanguy Leroux 27b65e90ca Merge pull request #18443 from tlrx/fix-18433
Add missing builder.endObject() in FsInfo
2016-05-18 15:40:55 +02:00
Jason Tedor cad0608cdb Add GC overhead logging
This commit adds simple GC overhead logging. This logging captures
intervals where the JVM is spending a lot of time performing GC but it
is not necessarily the case that each GC is large. For a start, this
logging is simple and does not attempt to incorporate whether or not the
collections were efficient (that is, we are only capturing that a lot of
GC is happening, not that a lot of useless GC is happening).

Relates #18419
2016-05-18 09:31:28 -04:00
Daniel Mitterdorfer 3954306af2 Merge pull request #18432 from danielmitterdorfer/fix-circuit-breaker-it
Clear all caches after testing parent breaker
2016-05-18 15:23:15 +02:00
Tanguy Leroux d7a31c8cf7 Add missing builder.endObject() in FsInfo
closes #18433
2016-05-18 15:19:30 +02:00
Christoph Büscher 808ef6cec7 Fix parsing single `rescore` element in SearchSourceBuilder
We are currently only parsing the array-syntax for the rescore part
in SearchSourceBuilder ("rescore" : [ {...}, {...} ]) . We also need
to support "rescore" : {...}

Closes #18439
2016-05-18 15:08:28 +02:00
Clinton Gormley c03dd8a290 Make the index-too-old exception more explicit (#18438)
Closes #18418
2016-05-18 13:33:25 +02:00
Daniel Mitterdorfer de3e7d161f Add tests for null precondition check in BulkRequest
Relates #18347

Checked with @javanna
2016-05-18 12:10:13 +02:00
Yannick Welsch 6dacac49b3 Simplify recovery logic in IndicesClusterStateService (#18405)
- Moves recovery logic into IndexShard
- Simplifies logic to cancel peer recovery of shard where recovery source node changed
- Ensures routing entry is set on initialization of IndexShard
2016-05-18 10:51:57 +02:00
Daniel Mitterdorfer c13df3b6c5 Clear all caches after testing parent breaker
With this commit we clear all caches after testing the parent circuit breaker.
This is necessary as caches hold on to circuit breakers internally. Additionally,
due to usage of CircuitBreaker#addWithoutBreaking() in caches, it's even possible
to go above the limit. As a consequence, all subsequent requests fall victim to
the limit.

Hence, right after the parent circuit breaker tripped, we clear all caches to
reduce these circuit breakers to 0 again. We also exclude the clear caches
transport request from limit check in order to ensure it will succeed. As this is
typically a very small and low-volume request, it is deemed ok to exclude it.

Closes #18325
2016-05-18 09:31:35 +02:00
Jason Tedor ecce53f0df Add I/O statistics on Linux
This commit adds a variety of real disk metrics for the block devices
that back Elasticsearch data paths. A collection of statistics are read
from /proc/diskstats and are used to report the raw metrics for
operations and read/write bytes.

Relates #15915
2016-05-17 16:16:39 -04:00
Jason Tedor 584be0b3f8 Refactor JvmGcMonitorService for testing
This commit refactors the JvmGcMonitorService so that it can be
tested. In particular, hooks are added to verify that the
JvmMonitorService correctly observes slow GC events, and that the
JvmGcMonitorService logs the correct messages.

Relates #18378
2016-05-17 13:05:36 -04:00
Yannick Welsch 9ba554dfd2 Expose previous cluster state only in RoutingAllocation (#18390)
Instead of re-exposing index metadata and blocks in RoutingNodes (which is part of the cluster state before rerouting), expose it as part of the RoutingAllocation which is known to be only temporarily used during reroute.
2016-05-17 19:02:28 +02:00
polyfractal c755a77022 [TEST] Use a reproducible source of randomness in shuffle 2016-05-17 12:55:07 -04:00
Zachary Tong 7c46b57ff2 Add a Sort ingest processor
Sorts an array of values in ascending or descending order. If all elements are numerics, they will be sorted numerically. If values are strings, or mixtures of strings/numbers, the elements will be sorted lexicographically.
2016-05-17 12:06:48 -04:00
Colin Goodheart-Smithe 8c9ca8b518 Moves query profiler classes into their own package
The change also renames fields and methods in the Profilers class.

Note that I had to make ProfileResult a public class (it was package private before) because now classes that call it are in a different package.
2016-05-17 14:20:05 +01:00
Ali Beyad 3764789d96 Removed unused AllocationService member in
TransportClusterAllocationExplainAction

Closes #18381
2016-05-16 18:41:36 -04:00
Robert Muir 8d4c1befe5 Merge pull request #18364 from rmuir/nukeRunAsFloat
Remove LeafSearchScript.runAsFloat(): Nothing calls it.
2016-05-16 17:08:25 -04:00
Adrien Grand 864ed04059 Lessen leniency of the query dsl. #18276
This change does the following:
 - Queries that are currently unsupported such as prefix queries on numeric
   fields or term queries on geo fields now throw an error rather than returning
   a query that does not match anything.
 - Fuzzy queries on numeric, date and ip fields are now unsupported: they used
   to create range queries, we now expect users to use range queries directly.
   Fuzzy, regexp and prefix queries are now only supported on text/keyword
   fields (including `_all`).
 - The `_uid` and `_id` fields do not support prefix or range queries anymore as
   it would prevent us to store them more efficiently in the future, eg. by
   using a binary encoding.

Note that it is still possible to ignore these errors by using the `lenient`
option of the `match` or `query_string` queries.
2016-05-16 17:37:00 +02:00
Colin Goodheart-Smithe e37e8af5e2 Refactor of query profile classes to make way for other profile implementations 2016-05-16 16:15:50 +01:00
Colin Goodheart-Smithe 6eda9f5df6 more tests following review 2016-05-16 09:07:22 +01:00
Colin Goodheart-Smithe 0c449fee4a small fix following rebase on master 2016-05-16 09:07:22 +01:00
Colin Goodheart-Smithe 66d0bdab0c review comments 2016-05-16 09:07:22 +01:00
Colin Goodheart-Smithe ab3121c871 Adds a methods to find (and dynamically create) the mappers for the parents of a field with dots in the field name 2016-05-16 09:07:22 +01:00
Robert Muir 8edf213492 Remove LeafSearchScript.runAsFloat(): Nothing calls it. 2016-05-15 22:59:28 -04:00
Michael McCandless 0d570352dd Merge pull request #18355 from mikemccand/iterables_flatten
Iterables.flatten should not pre-cache the first iterator
2016-05-15 10:21:35 -04:00
Mike McCandless 8d7db7fd7a remove whitespace 2016-05-14 18:50:10 -04:00
Mike McCandless ded8b400b0 Fix concurrency bug in IMC that could lead to negative total indexing bytes 2016-05-14 18:47:26 -04:00
Mike McCandless 48dca45564 leave Iterables.flatten pre-caching the outer Iterable 2016-05-14 17:10:17 -04:00
Mike McCandless 53c2f8b4b6 improve javadocs 2016-05-14 13:46:34 -04:00
Mike McCandless cf2af8961b Iterables.flatten should not pre-cache the first iterator 2016-05-14 13:39:48 -04:00
Ali Beyad d3d57da89f Removes unused methods in the o/e/common/Strings class.
Closes #18346
2016-05-14 08:08:30 -04:00
Daniel Mitterdorfer 009cf434a2 Merge pull request #18347 from danielmitterdorfer/bulk-req-precondition-check
Add not-null precondition check in BulkRequest
2016-05-14 11:25:02 +02:00
Daniel Mitterdorfer a2381640da Add not-null precondition check in BulkRequest
With this commit we add a precondition check to BulkRequest so
we fail early if users pass `null` for the request object.

For a more detailed discussion, see #12038.
This supersedes #12038.

Relates #12038.
2016-05-14 09:59:53 +02:00
Robert Muir 2028691e66 painless: improve exception stacktraces
closes #18319
2016-05-13 15:40:45 -04:00
Lee Hinman 864ba8dac1 Merge remote-tracking branch 'dakrone/there-can-be-only-one2' 2016-05-13 10:28:41 -06:00
Adrien Grand b4dec0ddbe Remove dead code. 2016-05-13 18:27:12 +02:00
Jason Tedor 81898a2e3e Avoid race while retiring executors
Today, a race condition exists when retiring executors. Namely, if an
executor is retired and then the thread pool is terminated, the retiring
of the executor and the termination of the thread pool can race to
remove the retired executor from the queue of retired executors. More
precisely, when the executor is initially retired, it is placed on a
queue of retired executors, and then removed when it is successfully
shutdown. When the pool is terminated, it will also drain the queue of
retired executors. This leads to a time-of-check-time-of-use race where
the draining can see a retired executor on the queue but that retired
executor can be removed upon successful shutdown of that executor. This
leads to the draining attempting to remove an element from the queue
when there is none. This commit addresses this race condition by instead
safely polling the queue.

Relates #18333
2016-05-13 12:26:18 -04:00
Lee Hinman 9bcdafedda Allow only a single extension for a scripting engine
Previously multiple extensions could be provided, however, this can lead
to confusion with on-disk scripts (ie, "foo.js" and "foo.javascript")
having different content. Only a single extension is now supported.

The only language currently supporting multiple extensions was the
Javascript engine ("js" and "javascript"). It now only supports the
`.js` extension.

Relates to #10598
2016-05-13 09:54:31 -06:00
Lee Hinman d5b75491dc Merge remote-tracking branch 'dakrone/remove-script-sandbox' 2016-05-13 09:50:39 -06:00
Britta Weber e7c17fc9fb [TEST] increase logger level until we know what is going on
We have an issue for it too: https://github.com/elastic/elasticsearch/issues/18121
2016-05-13 17:37:17 +02:00
Christoph Büscher a40c397c67 Don't allow `fuzziness` for `multi_match` types cross_fields, phrase and phrase_prefix
Currently `fuzziness` is not supported for the `cross_fields` type
of the `multi_match` query since it complicates the logic that
blends the term queries that cross_fields uses internally. At the
moment using this combination is silently ignored, which can lead to
confusions. Instead we should throw an exception in this case.
The same is true for phrase and phrase_prefix type.

Closes #7764
2016-05-13 17:32:14 +02:00
Jason Tedor 786a6a00d9 Add test for fixed executor rejected count
This commit adds a test that a fixed executors rejected count behaves as
expected. In particular, we test that if we consume the executor, then
stuff the executor queue, further tasks will be rejected and the
rejected stats are updated appropriately. This test also asserts that if
we resize the queue the rejected count is reset to zero.

Relates #18301
2016-05-13 11:27:12 -04:00
Lee Hinman efff3918d8 Remove support for mulitple languages per scripting engine 2016-05-13 09:24:31 -06:00
Lee Hinman a4060f7436 Remove vestiges of script engine sandboxing
This removes all the mentions of the sandbox from the script engine
services and permissions model. This means that the following settings
are no longer supported:

```yaml
script.inline: sandbox
script.stored: sandbox
```

Instead, only a `true` or `false` value can be specified.

Since this would otherwise break the default-allow parameter for
languages like expressions, painless, and mustache, all script engines
have been updated to have individual settings, for instance:

```yaml
script.engine.groovy.inline: true
```

Would enable all inline scripts for groovy. (they can still be
overridden on a per-operation basis).

Expressions, Painless, and Mustache all default to `true` for inline,
file, and stored scripts to preserve the old scripting behavior.

Resolves #17114
2016-05-13 09:24:31 -06:00
Adrien Grand 638da06c1d Add back support for `ip` range aggregations. #17859
This commit adds support for range aggregations on `ip` fields. However it will
only work on 5.x indices.

Closes #17700
2016-05-13 17:22:01 +02:00
Clinton Gormley f2797dbccb Fixed grammar in index-too-old exception (#18327) 2016-05-13 15:08:15 +02:00
Adrien Grand 61b1f4ad0b Fix xcontent rendering of ip terms aggs. #18003
Currently terms on an ip address try to put their binary representation in the
json response. With this commit, they would return a formatted ip address:

```
      "buckets": [
        {
          "key": "192.168.1.7",
          "doc_count": 1
        }
      ]
```
2016-05-13 14:59:36 +02:00
Daniel Mitterdorfer ddbfda2c68 Exclude specific transport actions from request size limit check
We add support to explicitly exclude specific transport actions
from the request size limit check.

We also exclude the following request types currently:

*MasterPingRequest
* PingRequest
2016-05-13 14:21:24 +02:00
Britta Weber d3efe37814 [TEST] mute test for now, we have an issue for it
https://github.com/elastic/elasticsearch/issues/18325
2016-05-13 14:08:17 +02:00
Britta Weber 0d5a2f25d3 [TEST] muste test, we have an issue for it
https://github.com/elastic/elasticsearch/issues/18293
2016-05-13 12:09:30 +02:00