Commit Graph

24952 Commits

Author SHA1 Message Date
Simon Willnauer 06cfffa0a9 Explain how unreleased versions should be added to the codebase without adding it to Version.java (#20892)
Sometimes it's useful / needed to use unreleased Version constants but we should not add those to the Version.java class for several reasons ie. BWC tests and assertions along those lines. Yet, it's not really obvious how to do that so I added some comments and a simple test for this.
2016-10-12 17:49:24 +02:00
Robin Clarke bbe6555b7a Docs: your -> you're (#20883) 2016-10-12 11:09:34 -04:00
Christoph Büscher c3e564a9cd Merge pull request #20673
Add test for using fuzziness parameter in multi_match query
2016-10-12 16:57:11 +02:00
Christoph Büscher 6c0e4fc13d Add test for using fuzziness parameter in multi_match query
There was an issue with using fuzziness parameter in multi_match query that has
been reported in #18710 and was fixed in Lucene 6.2 that is now used on master.
In order to verify that fix and close the original issue this PR adds the test
from that issue as an integration test.
2016-10-12 15:55:30 +02:00
Boaz Leskes 27c87ab961 improve testAutoGenerateIdNoDuplicates logging on failure
Add unique doc content and log the results of the search results on failure, so we can better see what went wrong
2016-10-12 15:31:00 +02:00
Clinton Gormley 4c62e14c50 Made REST query param types consistent
text -> string
2016-10-12 14:49:01 +02:00
Clinton Gormley e1ad00f07a Made REST query param types consistent
duration -> time
integer,float -> number
2016-10-12 14:42:19 +02:00
Simon Willnauer 7b65c97483 Use Arrays.toString to stringify a String[] 2016-10-12 14:20:41 +02:00
Boaz Leskes bc8ad8de5a MockBigArrays should tell you who originally released them 2016-10-12 13:03:40 +02:00
Simon Willnauer f96ea58db8 Prevent double release in TcpTransport if send listener throws an exception (#20880)
today we might release a bytes array more than once if the send listener
throws an exception but already has released the array. Yet, this is already fixed
in the BytesArray class we use in production to ensure 3rd party users don't release
twice but our mocks still enforce it.
2016-10-12 12:53:15 +02:00
Christoph Büscher 608c7eb9fa Merge pull request #20873: Use ConstructingObjectParser with DirectCandidateGeneratorBuilder
Use ConstructingObjectParser for parsing DirectCandidateGenerator
2016-10-12 10:28:33 +02:00
Tanguy Leroux 44ac5d057a Remove empty javadoc (#20871)
This commit removes as many as empty javadocs comments my regexp has found
2016-10-12 10:27:09 +02:00
Yannick Welsch 075047065d Keep snapshot restore state and routing table in sync (#20836)
The snapshot restore state tracks information about shards being restored from a snapshot in the cluster state. For example it records if a shard has been successfully restored or if restoring it was not possible due to a corruption of the snapshot. Recording these events is usually based on changes to the shard routing table, i.e., when a shard is started after a successful restore or failed after an unsuccessful one. As of now, there were two communication channels to transmit recovery failure / success to update the routing table and the restore state. This lead to issues where a shard was failed but the restore state was not updated due to connection issues between data and master node. In some rare situations, this lead to an issue where the restore state could not be properly cleaned up anymore by the master, making it impossible to start new restore operations. The following change updates routing table and restore state in the same cluster state update so that both always stay in sync. It also eliminates the extra communication channel for restore operations and uses standard cluster state listener mechanism to update restore listener upon successful
completion of a snapshot.
2016-10-12 09:06:37 +02:00
Nik Everett 42a7a554b1 Don't mind pending cluster tasks in docs build
This removes an assertion that the cluster doesn't have any
pending cluster state tasks from the `_cat/health` docs.

Relates to #18160
2016-10-11 17:44:50 -04:00
Nik Everett cb8fe00b0e Fix imports in GeoDistanceIT
Wildcard imports are not allowed.

Relates to #20860
2016-10-11 16:59:04 -04:00
brandonkearby a3908c4c40 Fixed writeable name from range to geo_distance (#20860)
* Fixed writeable name from range to geo_distance

* Added testGeoDistanceAggregation

* Added asserts for correct result in testGeoDistanceAggregation

* Setup mapping on test index.
2016-10-11 16:56:56 -04:00
Areek Zillur 481f7909ae Merge branch 'master' into cleanup/transport_bulk 2016-10-11 16:04:47 -04:00
Areek Zillur 0e8b6532ec rename DocumentRequest to DocWriteRequest 2016-10-11 16:00:10 -04:00
Areek Zillur 661067d160 change DocumentRequest<?> to DocumentRequest for readibility 2016-10-11 15:58:36 -04:00
Christoph Büscher ba4a3db03b Use ConstructingObjectParser for parsing DirectCandidateGenerator
When refactoring DirectCandidateGeneratorBuilder recently, the
ConstructingObjectParser that we have today was not available. Instead we used
some workaround, but it is better to remove this now and use
ConstructingObjectParser instead.
2016-10-11 21:17:47 +02:00
Nik Everett 298cf1cf21 CONSOLEify _cat/indices docs
Relates to #18160
Uses the new sorting (#20658) in the `_cat` API to support all use
cases natively. We can still resort to piping things through `sort`
if we need to, but we don't have to for basic stuff like sorting!
2016-10-11 14:55:37 -04:00
Areek Zillur 225a04b2cc fix update operation in bulk execution 2016-10-11 14:21:09 -04:00
Thibaud BARDIN 82881ef99a [DOCS] Fix typo in "Cluster Health" part (#20864)
Replace "we can see and total of ..." by "we can see a total of ..."
2016-10-11 13:53:11 -04:00
Lee Hinman f0a2726dcd [DOCS] Remove documentation for `force` version-type
This option should not be recommended to anyone, and should never be
used, upon chance of primary/replica divergence.

Relates to #19769
2016-10-11 11:21:32 -06:00
Nik Everett f3b8e7c238 Add `s` to _cat response parameters
`s` is used for sorting!

Relates to #20658
2016-10-11 12:29:55 -04:00
Alexander Lin 10ddcc4616 Adding built-in sorting capability to _cat apis. (#20658)
* Adding built-in sorting capability to _cat apis.

Closes #16975

* addressing pr comments

* changing value types back to original implementation and fixing cosmetic issues

* Changing compareTo, hashCode of value types to a better implementation

* Changed value compareTos to use Double.compare instead of if statements + fixed some failed unit tests
2016-10-11 12:29:22 -04:00
Tanguy Leroux 3b578db365 MultiGet should not fail entirely if alias resolves to many indices (#20858)
MultiGet should not fail entirely when one of the items of a multi get request refers to an alias that points to multiple indices.

closes #20845
2016-10-11 18:07:39 +02:00
Jason Tedor 05adc14231 Revert "Display plugins versions"
This reverts commit 9411f18f27.

Relates #20807
2016-10-11 11:59:06 -04:00
Boaz Leskes c6e1ef54f9 Keep a shadow replicas' allocation id when it is promoted to primary (#20863)
Shadow replicas can not be simply promoted to primary by updating boolean like normal shards. Instead the are reinitialized and shut down and rebuilt as primaries. Currently we also given them new allocation ids but that throws off the in-sync allocation ids management. This commit changes this behavior to keep the allocation id of the shard.

Closes #20650
2016-10-11 17:57:15 +02:00
Ali Beyad bbf6e6d0bd Fixes leading forward slash in S3 repository base_path (#20861)
In 2.x, the S3 repository accepted a `/` (forward slash) to start
the repositories.s3.base_path, and it used a different string splitting
method that removed the forward slash from the base path, so there
were no issues.

In 5.x, we removed this custom string splitting method in favor of
the JDK's string splitting method, which preserved the leading `/`.
The AWS SDK does not like the leading `/` in the key path after the
bucket name, and so it could not find any objects in the S3 repository.

This commit fixes the issue by removing the leading `/` if it exists
and adding a deprecation notice that leading `/` will not be supported
in the future in S3 repository's base_path.
2016-10-11 11:18:52 -04:00
Simon Willnauer c98e3f60f7 Ensure source filtering automatons are only compiled once (#20857)
This change adds a overloaded `XContentMapValues#filter` method that returns
a function enclosing the compiled automatons that can be reused across filter
calls. This for instance prevents compiling automatons over and over again when
hits are filtered or in the SourceFieldMapper for each document.

Closes #20839
2016-10-11 15:30:38 +02:00
Nik Everett 3528a514e2 Fix docs build
Removes a non-existant file from the non-`// CONSOLE` list. If you
remove all the non-`// CONSOLE` snippets from a file it must be
removed from the whitelist for the build to pass. Removing the file
entirely counts as removing the snippets.

Related to #18160
2016-10-11 08:58:51 -04:00
Clinton Gormley 82e2f6e747 Document the ctx._now variable in the update API
Relates to #20835
2016-10-11 13:13:03 +02:00
Clinton Gormley 5b5306ea82 Add an indices-upgrade section to the docs redirects. 2016-10-11 12:39:02 +02:00
Clinton Gormley a7d8de14bb Removed the upgrade API docs
Relates to #20675
2016-10-11 12:21:46 +02:00
Clinton Gormley 02a739d3c9 Added upgrade docs explaining how to reindex in place or reindex from remote
Closes #20675
2016-10-11 12:14:35 +02:00
Tanguy Leroux e4c7d8183e XContentBuilder: Avoid building self-referencing objects (#20550)
Some objects like maps, iterables or arrays of objects can self-reference themselves. This is mostly due to a bug in code but the XContentBuilder should be able to detect such situations and throws an IllegalArgumentException instead of building objects over and over until a stackoverflow occurs.

closes #20540
closes #19475
2016-10-11 11:41:54 +02:00
Boaz Leskes 1753c49beb add promised comment to testCanResetUnreasonableSettings
it got lost in a broken git song and dance.
2016-10-11 10:44:16 +02:00
Boaz Leskes fc4645bae6 Cluster Settings Updates should not trigger circuit breakers. (#20827)
Settings updates are important to be able to help and administer a cluster in distress. We shouldn't block it due to circuit breakers. An extreme example is where we are actually trying to increase and unreasonable low setting for the circuit breaker itself.

See https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+g1gc/242/
2016-10-11 10:36:55 +02:00
Boaz Leskes 1fe92360bc log debug in testShadowReplicaNaturalRelocation 2016-10-11 10:35:47 +02:00
Adrien Grand 1914df7b5f Do not cache script queries. (#20799)
The cache relies on the equals() method so we just need to make sure script
queries can never be equals, even to themselves in the case that a weight
is used to produce a Scorer on the same segment multiple times.

Closes #20763
2016-10-11 09:17:21 +02:00
Clinton Gormley 971b7ec542 Added version 5.0.0-rc2 2016-10-11 08:59:45 +02:00
Lee Hinman bd8f546381 Enable incremental compilation in gradle (#20847) 2016-10-10 15:47:35 -06:00
Pascal Borreli fcb01deb34 Fixed typos (#20843) 2016-10-10 14:51:47 -06:00
Simon Willnauer 44d960ea85 Handle rejected pings on shutdown gracefully (#20842)
`TcpTransport.ScheduledPing` doesn't handle rejected exceutions gracefully
if the executor is shutting down. This change adds correct exception handling
if we try to schedule another ping while the node is shutting down.
2016-10-10 22:22:48 +02:00
Simon Willnauer 37ca38df3d Expose `ctx._now` in update scripts (#20835)
Update scripts might want to update the documents `_timestamp` but need a notion of `now()`.
Painless doesn't support any notion of now() since it would make scripts non-pure functions. Yet,
in the update case this is a valid value and we can pass it with the context together to allow the
script to record the timestamp the document was updated.

Relates to #17895
2016-10-10 21:14:14 +02:00
Jim Ferenczi e874dee3bc Handle SynonymQuery extraction for the FastVectorHighlighter (#20829)
SynonymQuery was ignored by the FastVectorHighlighter.
This change adds the support for SynonymQuery in the FVH.
Although this change should be implemented in Lucene directly which is why https://issues.apache.org/jira/browse/LUCENE-7484 has been opened.
In the meantime this PR handles the issue on ES side and could be removed when LUCENE-7484 gets merged.

Fixes #20781
2016-10-10 17:46:19 +02:00
Jim Ferenczi c80a563a71 Replace org.elasticsearch.common.lucene.search.MatchNoDocsQuery with its Lucene version (org.apache.lucene.search.MatchNoDocsQuery) (#20832)
* Replace org.elasticsearch.common.lucene.search.MatchNoDocsQuery with its Lucene version (org.apache.lucene.search.MatchNoDocsQuery)

This change removes the ES version of the match no docs query and replaces it with the Lucene version.

relates #18030

* Add missing change
2016-10-10 17:45:19 +02:00
Simon Willnauer 4fd1276542 Prevent AbstractArrays from release bytes more than once (#20819)
Today we throw an assertion error if we release an AbstractArray more than once.
Yet, it's recommended to implement close methods such that they can be invoked
more than once. Guaranteed single release calls are hard to implement and some
situations might not be tested causing for instance `CircuitBreaker` to operate on
corrupted memory stats.
2016-10-10 17:30:37 +02:00
Daniel Mitterdorfer 087a931cb2 Use 'pipe' instead of of 'comma' to separate benchmark params
With this commit we separate benchmark parameters with pipe symbols
instead of commas as JMH has a special formatting logic for comma-separated
string which messes up the JSON output of microbenchmarks.
2016-10-10 14:56:44 +02:00