Commit Graph

38723 Commits

Author SHA1 Message Date
Jason Tedor d1670a18e4
Do not serialize common stats flags using ordinal (#29600)
This commit remove serializing of common stats flags via its enum
ordinal and uses an explicit index defined on the enum. This is to
enable us to remove an unused flag (Suggest) without ruining the
ordering and thus breaking serialization.
2018-04-19 20:12:24 -04:00
Jason Tedor a829d920ee
Remove stale comment from JVM stats (#29625)
We removed catched throwable from the code base and left behind was a
comment about catching InternalError in MemoryManagementMXBean. We are
not going to catch InternalError here as we expect that to be
fatal. This commit removes that stale comment.
2018-04-19 19:56:03 -04:00
Nhat Nguyen 293f85cd52 TEST: Mute testPrimaryRelocationWhileIndexing
AwaitsFix #29626
2018-04-19 19:15:30 -04:00
Jason Tedor 5d767e449a
Remove bulk fallback for write thread pool (#29609)
The name of the bulk thread pool was renamed to "write" with "bulk" as a
fallback name. This change was made in 6.x for BWC reasons yet in 7.0.0
we are removing this fallback. This commit removes this fallback for the
write thread pool.
2018-04-19 16:59:58 -04:00
Zachary Tong 2d6d3c3d74 [Rollup] Add scaled_float to allowed metric mapper types (elastic/x-pack-elasticsearch#4423)
We grab all the NumberFieldMappers to determine the whitelist of allowed
number types, but `scaled_float` is in a module so it isn't picked up
automatically.  This commit adds `scaled_float` to the whitelist
manually.

Original commit: elastic/x-pack-elasticsearch@fb35440315
2018-04-19 13:54:04 -07:00
Julie Tibshirani 113d1d3eab Fix an incorrect reference to 'zero_terms_docs' in match_phrase queries. 2018-04-19 13:24:14 -07:00
Julie Tibshirani 48461ac143 Update the version compatibility for zero_terms_query in match_phrase.
The change was just backported to 6.x.
2018-04-19 13:20:44 -07:00
Nhat Nguyen 955709b3f3 Account translog location to ram usage in version map
This commit accounts a translog location's ram usage in version map.
2018-04-19 16:05:33 -04:00
Jay Modi 3bc6fd76a3 Allow license installation in dev mode without TLS (elastic/x-pack-elasticsearch#4155)
This commit allows license installation without TLS being enabled when
the cluster is in dev mode. The main difference this change enables is
the ability to install a production license on a single node cluster
that is bound to localhost and does not have the single-node discovery
enabled.

relates elastic/x-pack-elasticsearch#4123

Original commit: elastic/x-pack-elasticsearch@04ebcc0fab
2018-04-19 13:49:27 -06:00
Nik Everett f0be979541 SQL: Mimick Elasticsearch defaults for sql action (elastic/x-pack-elasticsearch#4398)
The SQL action supports several text outputs and used to default to an
output that looked like the SQL CLI. It is a lovely output format but
this changes output selection behavior to mimick Elasticsearch's
standard behavior: it'll now default to the same format as the request.

That means that if you want the pretty text format then you need to ask
for it. The way to do that is:

```
POST /_xpack/sql?format=text/plain
{
    "query": "SELECT * FROM library ORDER BY page_count DESC LIMIT 5"
}
```

Original commit: elastic/x-pack-elasticsearch@4a15a23b18
2018-04-19 15:40:19 -04:00
Jason Tedor a28c0d2271 Remove extra spaces from changelog
This commit removes to extra spaces at the end of lines in the
changelog.
2018-04-19 15:10:19 -04:00
Lisa Cawley d835ad42f1 [DOCS] Remove X-Pakc installation page (elastic/x-pack-elasticsearch#4416)
Original commit: elastic/x-pack-elasticsearch@a5ca5c7230
2018-04-19 11:40:26 -07:00
Julie Tibshirani b9e1a00213
Add support to match_phrase query for zero_terms_query. (#29598) 2018-04-19 11:25:27 -07:00
Julie Tibshirani 00d88a5d3e
Fix incorrect references to 'zero_terms_docs' in query parsing error messages. (#29599) 2018-04-19 11:02:49 -07:00
Lee Hinman 0bd9163c28 Move sql-proto and jdbc to java.util.TimeZone (elastic/x-pack-elasticsearch#4350)
* Move sql-proto and jdbc to java.util.TimeZone

This moves sql-proto and jdbc from Joda's `DateTimeZone` to
`java.util.TimeZone`, this will allow us in the future to be able to decouple
JDBC from Joda.

This does not decouple all of SQL from joda, it focuses on as small a piece as I
could for sql-proto and jdbc.

Requires https://github.com/elastic/elasticsearch/pull/29487 to be merged first.

Original commit: elastic/x-pack-elasticsearch@7c9d52e675
2018-04-19 11:27:33 -06:00
Ryan Ernst 2574d4e704 Build: Change bwc java home check to new signature (elastic/x-pack-elasticsearch#4392)
The signature for getJavaHome is changing with
elastic/elasticsearch#29548.


Original commit: elastic/x-pack-elasticsearch@85434d0a13
2018-04-19 09:52:04 -07:00
Ryan Ernst 4f282e9e32
Build: Move java home checks to pre-execution phase (#29548)
This commit moves the checks on JAVAX_HOME (where X is the java version
number) existing to the end of gradle's configuration phase, and based
on whether the tasks needing the java home are configured to execute.

relates #29519
2018-04-19 09:51:52 -07:00
Nhat Nguyen 1b24d4e68b
Avoid side-effect in VersionMap when assertion enabled (#29585)
Today when a version map does not require safe access, we will skip that
document. However, if the assertion is enabled, we remove the delete
tombstone of that document if existed. This side-effect may accidentally
hide bugs in which stale delete tombstone can be accessed.

This change ensures putAssertionMap not modify the tombstone maps.
2018-04-19 12:38:10 -04:00
Lisa Cawley 2578346877 [DOCS] Fixes monitor privilege description (elastic/x-pack-elasticsearch#4403)
Original commit: elastic/x-pack-elasticsearch@579996d671
2018-04-19 09:27:40 -07:00
Christoph Büscher 7fa7dea044 [Tests] Remove accidental logger usage 2018-04-19 18:11:06 +02:00
Jay Modi 61542a5543 Wait for Netty threads after Security tests (elastic/x-pack-elasticsearch#4390)
This commit adds waits for two Netty threads that run in the background
and require explicit calls to await inactivity in them. This shows up
as an issue in security tests since we always use netty and do not have
these waits so these threads can trip the thread leak detector.

relates elastic/x-pack-elasticsearch#4367

Original commit: elastic/x-pack-elasticsearch@76d84553ba
2018-04-19 09:54:25 -06:00
Christoph Büscher d0f6657d90
Add tests for ranking evaluation with aliases (#29452)
The ranking evaluation requests so far were not tested against aliases
but they should run regardless of the targeted index is a real index or
an alias. This change adds cases for this to the integration and rest
tests.
2018-04-19 17:00:52 +02:00
Jay Modi 502bc6c572 Clarify index operations for create privilege (elastic/x-pack-elasticsearch#4337)
The `create` privilege can be misleading based on a user's
interpretation of the meaning of the privilege. The create privilege
grants the user access to the index api and the put mapping api. The
index api allows for a document to be created but it also allows for
an existing document to be overwritten (assuming the CREATE operation
type is not used). However, the name `create` implies the ability to
only create a document and not be able to modify an existing document,
which may not be clear to users unfamiliar with the index API.

This commit adds a small note under the privilege in the documentation
that should add some clarity to the operations allowed by this
privilege.

Original commit: elastic/x-pack-elasticsearch@24596c41b0
2018-04-19 08:52:30 -06:00
Christoph Büscher 24763d881e
Deprecate use of `htmlStrip` as name for HtmlStripCharFilter (#27429)
The camel case name `htmlStip` should be removed in favour of `html_strip`, but
we need to deprecate it first. This change adds deprecation warnings for indices 
with version starting with 6.3.0 and logs deprecation warnings in this cases.
2018-04-19 16:48:17 +02:00
Russ Cam d62b6eb3b8 [DOCS] Update forecast_id to string in response (elastic/x-pack-elasticsearch#4245)
This commit updates forecast_id to be a string within the response,
to match source code.

Original commit: elastic/x-pack-elasticsearch@b6fbc87a84
2018-04-19 15:01:17 +01:00
tomcallahan 8d6f36c507 Remove copy-pasted code (elastic/x-pack-elasticsearch#4298)
* Remove copy-pasted code

An examination of the x-pack source code revealed copy-pasted code
in ActiveDirectoryGroupsResolver in the binarySidToStringSid
method.  I have replaced this with an apache2 implementation from
the apache directory studio project.  Furthermore, I have added
a test that leverages a real binary/string SID pair retrieved
from an active directory domain controller.  The apache2-based
implementation is exempt for the license checker.

Original commit: elastic/x-pack-elasticsearch@81a7471261
2018-04-19 09:12:15 -04:00
Adrien Grand 6e62b481b4
Update plan for the removal of mapping types. (#29586)
8.x will no longer allow types in APIs and 7.x will issue deprecation warnings
when `include_type_name` is set to `false`.
2018-04-19 15:09:14 +02:00
Christoph Büscher 124fecd221 [Docs] Add rankEval method for Jva HL client
This change adds documentation about using the ranking evaluation API
from the high level Java REST client.

Closes #28694
2018-04-19 14:39:42 +02:00
Christoph Büscher 7c56cc2624 Make ranking evaluation details accessible for client
Allow high level java rest client to access details of the metric
calculation by making them accessible across packages. Also renaming the
inner `Breakdown` classes of the evaluation metrics to `Detail` to
better communicate their use.
2018-04-19 14:39:41 +02:00
Jason Tedor 650b80a982 Reflect renaming of bulk thread pool (elastic/x-pack-elasticsearch#4414)
The bulk thread pool was renamed to the write thread pool. This commit
adds support for this in X-Pack. Specifically, a change is needed in
monitoring to reflect the name change (and support the possibility that
the user has the display name for the write thread pool as "bulk").

Original commit: elastic/x-pack-elasticsearch@c3c4b99be5
2018-04-19 08:22:10 -04:00
Jason Tedor c12c2a6cc9 Rename the bulk thread pool to write thread pool (#29593)
This commit renames the bulk thread pool to the write thread pool. This
is to better reflect the fact that the underlying thread pool is used to
execute any document write request (single-document index/delete/update
requests, and bulk requests).

With this change, we add support for fallback settings
thread_pool.bulk.* which will be supported until 7.0.0.

We also add a system property so that the display name of the thread
pool remains as "bulk" if needed to avoid breaking users.
2018-04-19 08:18:58 -04:00
Christoph Büscher fa1052017c
[Test] Minor changes to rank_eval tests (#29577)
Removing an enum in favour of local constants to simplify tests and
removing a few deprecated method calls and warnings.
2018-04-19 13:50:18 +02:00
Tanguy Leroux e2d770d9b9
Fix missing node id prefix in startup logs (#29534)
When `node.name` is not set, some log traces at startup time does not
show the node id.
2018-04-19 09:40:25 +02:00
Martijn van Groningen 8afa7c174f
Added painless execute api. (#29164)
Added an api that allows to execute an arbitrary script and a result to be returned.

```
POST /_scripts/painless/_execute
{
  "script": {
    "source": "params.var1 / params.var2",
    "params": {
      "var1": 1,
      "var2": 1
    }
  }
}
```

Relates to #27875
2018-04-19 09:33:34 +02:00
Martijn van Groningen 621a1935b8
test: also assert deprecation warning after clusters have been closed. 2018-04-19 09:20:04 +02:00
Ryan Ernst 1cb3a9d9dc Test: Guard deprecation check when 0 nodes created
The internal test cluster can sometimes have 0 nodes. In this situation,
the http.enabled flag will never be read, and thus no deprecation
warning will be emitted. This commit guards the deprecation warning
check in this case.
2018-04-18 21:18:56 -07:00
Jason Tedor 4e376070a3 Remove index thread pool from monitoring filters (elastic/x-pack-elasticsearch#4409)
The index thread pool is gone, so the index thread pool stats do not any
longer need to be whitelisted in the monitoring stats.

Original commit: elastic/x-pack-elasticsearch@83f7742805
2018-04-18 21:02:06 -04:00
Ryan Ernst d0ee36b192 Update tests using http.enabled (elastic/x-pack-elasticsearch#4413)
This commit updates tests using http.enabled to expect a deprecation
warning.

relates https://github.com/elastic/elasticsearch/pull/29591

Original commit: elastic/x-pack-elasticsearch@92e5ea9c74
2018-04-18 17:36:14 -07:00
Ryan Ernst 98d776edaf
Networking: Deprecate http.enabled setting (#29591)
This commit deprecates the http.enabled, in preparation for removing the
feature in 7.0.

relates #12792
2018-04-18 17:36:09 -07:00
debadair 0c9baebe15
[DOCS] Added include for internal highlighters section. (#29597) 2018-04-18 16:56:09 -07:00
Mayya Sharipova bf6cfff080
[DOCS] Update highlighting docs (#28802)
- add more explanation to some highlighting parameters
- add a document describing how highlighters work internally
2018-04-18 17:41:19 -04:00
Jack Conradson da9a6899ff
Painless: modify grammar to allow more statement delimiters (#29566)
This allows the grammar to determine when and what delimiters statements will use by
splitting up the statements into regular statements and delimited statements, those that do
not require a delimiter versus those that do. This allows consumers of the statements to
determine what delimiters the statements will use so that in certain cases semicolons are
not necessary like when there's a closing right bracket.

This change removes the need for semicolon insertion in the lexer, simplifying the existing
lexer quite a bit. It also ensures that there isn't a need to track semicolons being inserted
into places that aren't necessary such as array initializers.
2018-04-18 10:32:42 -07:00
Lisa Cawley dcedffb0f0 [DOCS] Replaces InetSocketTransportAddress in code samples (elastic/x-pack-elasticsearch#4404)
Original commit: elastic/x-pack-elasticsearch@85b11cccc7
2018-04-18 09:15:43 -07:00
Paul Sanwald 3e7fccddaf
Add a CHANGELOG file for release notes. (#29450)
* Add a CHANGELOG file for 7.x release notes.

* update file to include 6.x

* remove confusing comment and small edit to section title

* moving CHANGELOG file under docs directory, as it pertains to release notes.
2018-04-18 07:42:05 -07:00
Jason Tedor 2b47d67d95
Remove the index thread pool (#29556)
Now that single-document indexing requests are executed on the bulk
thread pool the index thread pool is no longer needed. This commit
removes this thread pool from Elasticsearch.
2018-04-18 09:18:08 -04:00
Jim Ferenczi 9d11c7a6c1 Remove extra copy in ScriptDocValues.Strings
This commit removes a BytesRef copy introduced in #29567 and not
required.

Relates #29567
2018-04-18 15:13:24 +02:00
Jason Tedor a548a7f2cb
Fix full cluster restart test recovery (#29545)
The test was using a parameter on GET /_cluster/health that older nodes
do not understand. Yet, we do no even need to make this call here, we
can use ensure green for the index.
2018-04-18 08:43:43 -04:00
Jim Ferenczi a7c9857976
Fix binary doc values fetching in _search (#29567)
Binary doc values are retrieved during the DocValueFetchSubPhase through an instance of ScriptDocValues.
Since 6.0 ScriptDocValues instances are not allowed to reuse the object that they return (https://github.com/elastic/elasticsearch/issues/26775) but BinaryScriptDocValues doesn't follow this restriction and reuses instances of BytesRefBuilder among different documents.
This results in `field` values assigned to the wrong document in the response.
This commit fixes this issue by recreating the BytesRef for each value that needs to be returned.

 Fixes #29565
2018-04-18 13:01:06 +02:00
David Roberts fd3f079276 [ML] Exclude failed jobs from node allocation decision (elastic/x-pack-elasticsearch#4395)
When calculating the current load on each ML node during the
node allocation process we should be ignoring failed jobs.
This is because failed jobs do not have a corresponding native
process, so do not consume memory or CPU resources.

relates elastic/x-pack-elasticsearch#4381

Original commit: elastic/x-pack-elasticsearch@1cb0ca973e
2018-04-18 10:10:55 +01:00
Jim Ferenczi 8b34066d8b Mutes failing MovAvgIT tests
Relates #29456
2018-04-18 10:54:45 +02:00