Commit Graph

23257 Commits

Author SHA1 Message Date
Nicholas Knize f77f79c24a GeoBoundingBoxQueryBuilder should fail when topLeft and bottomRight are the same coordinate 2016-07-11 10:25:33 -05:00
Simon Willnauer ee193f7697 [TEST] Catch RejectedOperationException when disconnecting from node in MockTcpTransport 2016-07-11 16:36:26 +02:00
Simon Willnauer 07260d4351 [TEST] Use AbstractRunnable when forking off threads on an executor 2016-07-11 16:27:07 +02:00
Sho Minagawa 6aa598e3fb Fix typo on analyze.asciidoc (#19354) 2016-07-11 15:49:39 +02:00
Jason Tedor df7ad9970b Batch process node left and node failure
Today when a node is removed the cluster (it leaves or it fails), we
submit a cluster state update task. These cluster state update tasks are
processed serially on the master. When nodes are removed en masse (e.g.,
a rack is taken down or otherwise becomes unavailable), the master will
be slow to process these failures because of the resulting reroutes and
publishing of each subsequent cluster state. We improve this in this
commit by processing the node removals using the cluster state update
task batch processing framework.

Relates #19289
2016-07-11 08:30:09 -04:00
Simon Willnauer 3f3c93ec65 Add blocking socket based MockTcpTransport (#19332)
Today we have a bunch of tests that use netty transport for several reasons
these tests use it because they need to run some tcp based transport. Yet, this
couples our tests tightly to the netty implementation which should be tested on it's own.
This change adds a plain socket based blocking TcpTransport implementation that is used by
default in tests if local transport is suppressed or if network is selected.
It also adds another tcp network implementation as a showcase how the interface works.
2016-07-11 12:17:52 +02:00
Simon Willnauer 1d03a1409c Catch assertion errors on commit and turn it into a real exception (#19357)
Lucene IndexWriter asserts on files existing on the filesystem but
some tests throw IOException explicitly on those operatiosn such that
some tests trip asserts. We had this before on InternalEngine#ctor
and added some logic there to catch only a specific assertions based
on some excepition stack analysis. This change applies the same logic
to the IndexWriter#commit part of the engine since it can hit the same
issue.
This also fixes a self-suppression issue in Store.java.

Closes #19356
2016-07-11 11:20:56 +02:00
Luca Cavanna db111174ec Merge pull request #19340 from javanna/enhancement/perform_request_variants
Rest Client: add short performRequest method variants without params and/or body
2016-07-11 10:37:01 +02:00
javanna 942e342662 Rest Client: use short performRequest methods when possible 2016-07-11 10:36:26 +02:00
javanna fd297637a2 Rest Client: add short performRequest method variants without params and/or body
Users wanting to send a request by providing only its method and endpoint, effectively the only two required arguments, shouldn't need to pass in an empty map and a null entity for the body. While at it we can also add a variant to send requests by specifying only method, endpoint and params, but not body. Headers remain a vararg as last argument, so they can always optionally be provided.

 Closes #19312
2016-07-11 10:36:04 +02:00
Simon Willnauer 36dbe7250f Cleanup usage of http.enabled (#19351)
Several tests required http.enabled where it was unnecessary.
We also had RestMainActionIT which tests what two of our REST tests
test already so I removed it.
The explicit use of http.enabled: false is also obsolet since our
test do that by default.
2016-07-11 10:21:03 +02:00
Martijn van Groningen 306b1d9221 test: better file names 2016-07-11 08:48:29 +02:00
Ryan Ernst 25ed93dd28 Fix test edge case for random bytes reference iter.
Getting an offset to the last byte means we can only stream one byte and
then we are done, we can't get another offset after it.
2016-07-10 09:11:32 -07:00
Nicholas Knize ab8b577aea Use GeoDistanceIT.testDuelOptimizations for bwc testing only
This test is only relevant for testing the GeoDistanceBuilder with old indices (pre GeoPointV2).

closes #19263
2016-07-09 19:08:06 -05:00
Ryan Ernst 3832825a87 Merge pull request #19348 from rjernst/deguice_attrs
Remove CustomNodeAttributes extension point
2016-07-09 12:46:26 -07:00
Ryan Ernst 03bd152a01 Merge pull request #19346 from rjernst/deguice_guice
Remove child injectors from guice
2016-07-09 12:33:06 -07:00
Ryan Ernst 1fa8ba6c66 Add unit tests for ec2 AZ node attributes 2016-07-09 09:40:08 -07:00
Ryan Ernst 2b9d4bdf85 Plugins: Remove CustomNodeAttributes extension point
The DiscoveryNodeService exists to register CustomNodeAttributes which
plugins can add. This is not necessary, since plugins can already add
additional attributes, and use the node attributes prefix.

This change removes the DiscoveryNodeService, and converts the only
consumer, the ec2 discovery plugin, to add the ec2 availability zone
in additionalSettings().
2016-07-08 21:39:11 -07:00
Ryan Ernst 7e59181e58 Internal: Remove child injectors from guice
This change removes the ability for guice to have child injectors (and
the entire concept of parent injectors) from our fork of guice. The
methodology for removing was simple: I removed createChildInjector, and
continued to remove methods and members that were unused until my head
was spinning. The motivation for this change is to limit what our fork
of guice gives us access to, so we don't regress and start adding back
more complicated uses.
2016-07-08 15:22:50 -07:00
Ryan Ernst dea00a0b16 Merge pull request #19324 from rjernst/repository_deguice2
Add RepositoryPlugin interface for registering snapshot repositories
2016-07-08 14:38:07 -07:00
Ryan Ernst 53b8a0c63e Add back tests for setting reader helper in s3 and illegal buffer/chunk size 2016-07-08 14:27:08 -07:00
Jason Tedor 41874de21d Add indefinite articles to issue template
This commit adds an indefinite article when referring to operating
systems in the issue template comments regarding supported operating
systems.
2016-07-08 14:34:15 -04:00
Nicholas Knize 8dd4a6473e Remove radial restriction for GeoDistanceQuery
As of lucene 6.1 GeoDistanceQuery no longer requires restricting the radial distance in GeoPointDistanceQuery.

closes #17578
2016-07-08 12:13:22 -05:00
Yannick Welsch 7dff8fbb1d Update resiliency docs (#19303)
Adds clarifications about Jepsen tests and new section on issues with versioning.
2016-07-08 17:30:46 +02:00
Clinton Gormley 982e01d463 Update network.asciidoc
`network.publish_host` defaults to `network.host`, not `network.bind_host`

Closes #19304
2016-07-08 17:13:10 +02:00
Nicholas Knize 72fa345f5e Mute GeoDistanceIT while fixing 2016-07-08 10:02:15 -05:00
Jason Tedor 527980c995 Fix nesting of stopping docs
This commit fixes errant nesting of the stopping docs due to using a
section header instead of a chapter header at the top of the stopping
docs.
2016-07-08 10:43:35 -04:00
Jason Tedor 8992a5f0f5 Add note to issue template regarding supported OS
This commit adds a note to the GitHub issue template noting that bug
reports on OS that we do not support or feature requests for OS that we
do not support will be closed.

Relates #19322
2016-07-08 10:12:03 -04:00
Martijn van Groningen ff5527f037 percolator: Forbid the usage or `range` queries with a range based on the current time
If there are percolator queries containing `range` queries with ranges based on the current time then this can lead to incorrect results if the `percolate` query gets cached.  These ranges are changing each time the `percolate` query gets executed and if this query gets cached then the results will be based on how the range was at the time when the `percolate` query got cached.

The ExtractQueryTermsService has been renamed `QueryAnalyzer` and now only deals with analyzing the query (extracting terms and deciding if the entire query is a verified match) . The `PercolatorFieldMapper` is responsible for adding the right fields based on the analysis the `QueryAnalyzer` has performed, because this is highly dependent on the field mappings. Also the `PercolatorFieldMapper` is responsible for creating the percolate query.
2016-07-08 14:20:56 +02:00
Simon Willnauer f6ac147b1d Add a unit test that sends random requests among 3 nodes (#19329)
This adds a test that uses transport implementation and sends random requests
to 3 different nodes, the request handlers maybe forwarding the requests to yet another node
etc. until returning the response. This test basically tests that nodes are not deadlocking
in a distributed fashion.
2016-07-08 14:13:36 +02:00
Jason Tedor d29d2f8793 Disable service in pre-uninstall
Today in the packaging removal scripts, we disable the service in
post-uninstall. Yet, this happens after service files have been
erased. On some systems, this can cause the service disable to fail
leaving behind state causing the service to be enabled on subsequent
installs. This commit moves the service disabling to the pre-uninstall
script to prevent this issue.

Relates #19328
2016-07-08 07:58:52 -04:00
javanna 2a91a6ac37 Rest Client: check log level against tracer logger for trace logging 2016-07-08 12:52:29 +02:00
javanna c63719d085 Rest Client: wrap log statement in logger.isDebugEnabled 2016-07-08 12:51:48 +02:00
Luca Cavanna 02c98b11ab Merge pull request #19325 from javanna/fix/request_logger_missing_slash
Rest Client: add slash to log line when missing between host and uri
2016-07-08 12:39:43 +02:00
javanna cfc762b70d Rest Client: add slash to log line when missing between host and uri
Closes #19314
2016-07-08 12:25:20 +02:00
Luca Cavanna 64880ca4ed Merge pull request #19306 from javanna/fix/default_sniffer_scheme
Rest Client: HostsSniffer to set http as default scheme
2016-07-08 10:57:59 +02:00
Martijn van Groningen 7b8ae54f0f percolator: Also support query term extract for queries wrapped inside a FunctionScoreQuery
Additionally for highlighting percolator hits, also extract percolator query from FunctionScoreQuery and DisjunctionMaxQuery
2016-07-08 10:51:48 +02:00
Simon Willnauer 1cb1373722 [TEST] Test analyzer alias works
Relates to #19163
2016-07-08 10:33:12 +02:00
Ryan Ernst e6be4af014 Plugins: Add RepositoryPlugin interface for registering snapshot repositories
Repository plugins currently use a lot of custom classes like
RepositoryName and RepositorySettings in order to use guice to construct
repository implementations. But repositories now only really need their
settings to be constructed. Anything else they need (eg a cloud client)
can be constructed within the plugin, instead of via guice.

This change makes repository plugins use the new pull model. It removes
guice from the construction of Repository objects (no more child
injectors) and also from all repository plugins.
2016-07-08 00:10:03 -07:00
Adrien Grand bbf8f3499b Merge pull request #19320 from elastic/GlenRSmith-patch-1
slight clarification
2016-07-08 08:29:34 +02:00
Glen Smith d7099f05b9 slight clarification 2016-07-07 20:46:18 -04:00
Nik Everett 81fcdfcee9 Expose task information from NodeClient
This exposes a method to start an action and return a task from
`NodeClient`. This allows reindex to use the injected `Client` rather
than require injecting `TransportAction`s
2016-07-07 18:02:09 -04:00
Nik Everett fe0f28965a Clean up serialization of terms aggregation results
Move to NamedWriteable and remove a lot of duplication.
2016-07-07 17:01:09 -04:00
Nik Everett 7da753a4d7 Migrate sampler and missing aggregations to NamedWriteable
This is another step down the path to removing aggregation's special
"streams" which reimplement NamedWriteable.
2016-07-07 16:40:38 -04:00
Nik Everett d83e1cccac Fix checkstyle in test 2016-07-07 16:40:11 -04:00
Ryan Ernst 89d69ea5a2 Merge pull request #19292 from rjernst/repository_deguice
Simplified repository api for snapshot/restore
2016-07-07 13:03:58 -07:00
Ryan Ernst 593f8bdf0c Rename repository api methods for clarity and tweak documentation. 2016-07-07 12:54:10 -07:00
Martijn van Groningen bf0c362412 ingest: Fixed left over rename to 'ingest-user-plugin'
Closes #19307
2016-07-07 21:29:40 +02:00
Jason Tedor 7d13906fcd Add skip to failing ingest-user-agent REST test
This commit adds a skip to a failing ingest-user-agent REST test.
2016-07-07 15:14:19 -04:00
Jason Tedor e86aa29f67 Die with dignity
Today when a thread encounters a fatal unrecoverable error that
threatens the stability of the JVM, Elasticsearch marches on. This
includes out of memory errors, stack overflow errors and other errors
that leave the JVM in a questionable state. Instead, the Elasticsearch
JVM should die when these errors are encountered. This commit causes
this to be the case.

Relates #19272
2016-07-07 14:44:03 -04:00