Commit Graph

5125 Commits

Author SHA1 Message Date
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
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
Olivier Bourgain df43230844 Add index name and uuid in IndexAlreadyExistsException default message
Relates #18274
2016-05-12 14:32:30 -04:00
Jason Tedor 0830bd4885 Remove period in min master node check log message
As most of our log messages are not sentences and do not end with
periods, this commit removes a period from the end of the min master
node bootstrap check log message.
2016-05-12 12:48:58 -04:00
Zachary Tong 5ee5cc25cc Move AsciiFolding earlier in FingerprintAnalyzer filter chain
Rearranges the FingerprintAnalyzer so that AsciiFolding comes earlier in the chain (after lowercasing, before stop removal, for maximum deduping power)

Closes #18266
2016-05-12 09:34:15 -04:00
Robert Muir 3b66d40f7c Merge pull request #18284 from rmuir/painless_value_aggregations
_value support in painess?
2016-05-11 20:37:35 -04:00
Robert Muir 6b4e47bf96 this makes aggregations per-document _value fast (bypass hash put, hash get, etc) for painless.
but i have no clue how to test it, it seems this feature never worked via REST?

Should we drop the feature instead?
2016-05-11 15:39:00 -04:00
Ali Beyad 189341da10 CORS handling triggered whether User-Agent is a browser or not
This commit ensures that if CORS is enabled, then Origin headers are
checked regardless of whether the request came from a browser or not.
In the past, we only proceeded with CORS checks if the User-Agent was a
browser.
2016-05-11 15:30:15 -04:00
Ali Beyad fced8dac72 When CORS is enabled, permit requests from the same origin as the
request host, as the request is not a cross origin.

Relates #18256
2016-05-11 15:24:36 -04:00
Ali Beyad 5189eb41c7 Dangling indices are not imported if a tombstone for the same index
(same name and UUID) exists in the cluster state.  This resolves a
situation where if an index data folder was copied into a node's data
directory while the node is running and that index had a tombstone in
the cluster state, the index would still get imported.

Closes #18250
Closes #18249
2016-05-11 12:56:19 -04:00
Adrien Grand ce4af4be42 Remove dead code. 2016-05-11 18:38:07 +02:00
Adrien Grand 866a5459f0 Make significant terms work on fields that are indexed with points. #18031
It will keep using the caching terms enum for keyword/text fields and falls back
to IndexSearcher.count for fields that do not use the inverted index for
searching (such as numbers and ip addresses). Note that this probably means that
significant terms aggregations on these fields will be less efficient than they
used to be. It should be ok under a sampler aggregation though.

This moves tests back to the state they were in before numbers started using
points, and also adds a new test that significant terms aggs fail if a field is
not indexed.

In the long term, we might want to follow the approach that Robert initially
proposed that consists in collecting all documents from the background filter in
order to compute frequencies using doc values. This would also mean that
significant terms aggregations do not require fields to be indexed anymore.
2016-05-11 16:52:58 +02:00
Jason Tedor d0edd13f7b Log setting key not setting object in IMC
This commit modifies two logging statements in the
IndexingMemoryController to log the key for the setting
indices.memory.index_buffer_size instead of the object.

Relates #18191
2016-05-11 10:37:23 -04:00
Yannick Welsch ae01a4f7f9 Increased logging level for testDelayedAllocationChangeWithSettingTo100ms 2016-05-11 11:59:41 +02:00
Jason Tedor 5f0cc79562 Sort plugins in list plugins command
This commit modifies the list plugins command to produce deterministic
output by sorting the plugins by comparing paths.

Relates #18260
2016-05-10 22:06:37 -04:00
Yannick Welsch a0ffe6ea89 [TEST] Ensure creation of valid routing table
An additional sanity check introduced by #17821 makes some tests fail. This check verifies that
only one shard with same shard id is allocated to a node. This commit fixes a bug in
ClusterStateCreationUtils which would construct a cluster state that allocated two shards with same
id to the same node.
2016-05-10 19:40:19 +02:00
Yannick Welsch 7753420540 Make ShardRouting and UnassignedInfo immutable (#17821)
This makes defensive copying of ShardRouting objects obsolete whenever we do a reroute and trashes less objects.
2016-05-10 19:11:04 +02:00
Jason Tedor 81c0b7bfa9 Log exception when join validation fails
Today when join validation fails, we log a warning but do not log the
exception that led to the join validation failing. This commit modifies
this so that we do log this exception.
2016-05-10 11:56:57 -04:00
Yannick Welsch ad5ce598db Use uppercase 'L' for long literal 2016-05-10 17:32:21 +02:00
Gabriel Moskovicz 0660386976 Add plugin information for Verbose mode
Relates #18051
2016-05-10 11:23:17 -04:00
Lee Hinman a45e1cc750 Add test for NullPointerException in SQS when analyzing text produces null query 2016-05-10 08:35:48 -06:00