Commit Graph

22085 Commits

Author SHA1 Message Date
spalger be2ba53fca [rest api spec] fix doc urls 2016-05-20 13:48:16 -07:00
Jason Tedor 4c7993ea71 Netty request/response tracer should wait for send
We write to Netty channels in an async fashion, but notify listeners via
a transport service adapter before we are certain that the channel write
succeeded. In particular, the tracer logs are implemented via a
transport service adapter and this means that we can write tracer logs
before a write was successful and in some cases the write might fail
leading to misleading logs. This commit attaches the transport service
adapters to channel writes as a listener so that the notification occurs
only after a successful write.

Relates #18500
2016-05-20 16:26:46 -04:00
Jason Tedor 452faa220c Filter client/server VM options from jvm.options
The default jvm.options file ships with the -server flag to force the
server VM on systems where the server VM is not the default. However,
the method of starting the JVM via the Windows service does not support
the command-line flags for selecting the VM because it starts from a
DLL that is specific to the server or client VM. Thus, we need to
filter these options from the jvm.options configuration file when
installing the Windows service.

Relates #18473
2016-05-20 15:25:45 -04:00
Spencer 332f6ffe59 [rest api spec] fix url for reindex api docs 2016-05-20 12:22:56 -07:00
Ali Beyad 923d90d434 Remove use of a Fields class in snapshot responses that contains
x-content keys, in favor of declaring/using the keys directly.

Closes #18497
2016-05-20 15:07:41 -04:00
Simon Willnauer 35e705877b Limit retries of failed allocations per index (#18467)
Today if a shard fails during initialization phase due to misconfiguration, broken disks,
missing analyzers, not installed plugins etc. elasticsaerch keeps on trying to initialize
or rather allocate that shard. Yet, in the worst case scenario this ends in an endless
allocation loop. To prevent this loop and all it's sideeffects like spamming log files over
and over again this commit adds an allocation decider that stops allocating a shard that
failed more than N times in a row to allocate. The number or retries can be configured via
`index.allocation.max_retry` and it's default is set to `5`. Once the setting is updated
shards with less failures than the number set per index will be allowed to allocate again.

Internally we maintain a counter on the UnassignedInfo that is reset to `0` once the shards
has been started.

Relates to #18417
2016-05-20 20:37:45 +02:00
Robert Muir a2ff002e2b Merge pull request #18463 from rmuir/whitelist_cleanup
painless: steps at definition cleanup
2016-05-20 14:26:41 -04:00
Jack Conradson b156438957 Proxy box method to use valueOf. 2016-05-20 11:22:18 -07:00
Jack Conradson 0e24ed49e6 Use the build-in valueOf method instead of the custom one. 2016-05-20 11:13:43 -07:00
Jack Conradson d836194095 Fixed tests and added a comment to the box method. 2016-05-20 11:04:09 -07:00
Jack Conradson 2b793c1e06 Fix boxing. 2016-05-20 10:38:06 -07:00
Jason Tedor 61f40156d3 Do not decode path when sending error
Today when sending a REST error to a client, we send the decoded
path. But decoding that path can already be the cause of the error in
which case decoding it again will just throw an exception leading to us
never sending an error back to the client. It would be better to send
the entire raw path to the client and that is what we do in this commit.

Relates #18477
2016-05-20 12:15:30 -04:00
Robert Muir c0eb813e10 Merge branch 'clean' into whitelist_cleanup 2016-05-20 10:59:13 -04:00
Igor Motov ce88d7f9ab Fix race condition in snapshot initialization
When a snapshot initialization fails, the create snapshot method may return before the snapshot metadata in the cluster state is removed. This can cause follow up snapshot-API related calls to fail due to a snapshot still running. This is causing CI failures when we try to delete indices that were participating in failed snapshot to a read-only repository.

Closes #18121
2016-05-20 10:52:08 -04:00
Jason Tedor 76f310ea15 Passthrough test logger level to nodes
This commit passes the system property tests.logger.level down to the
external nodes launched in integration tests. Specific tests that want
to override the default logging level should push down a setting to
the nodes using cluster configuration instead of pushing down a system
property to the nodes using cluster configuration.

Relates #18489
2016-05-20 10:40:55 -04:00
Robert Muir ce9b36590a simplify tree node use of compiler settings 2016-05-20 09:36:09 -04:00
Daniel Mitterdorfer 8b962bb234 Increase log level for NettyHttpRequestSizeLimitIT
This test fails spuriosly in CI and is not reproducible locally.

With this commit we temporarily increase the log level in a few
packages that are suspected to reveal the cause.
2016-05-20 15:12:52 +02:00
Jason Tedor 140f9dfe5f Fix scaling thread pool test bug
This commit fixes a test bug in the scaling thread pool configuration
test. In particular, the test randomization could select min and max for
a thread pool configuration where both are equal to zero. This is a
violation of the requirements of the ThreadPoolExecutor. With this
commit, we now ensure that the max is bounded below by one.
2016-05-20 08:58:08 -04:00
Martijn van Groningen 80fee8666f percolator: Removed percolator cache
Before 5.0 for it was required that the percolator queries were cached in jvm heap as Lucene queries for two reasons:
1) Performance. The percolator evaluated all percolator queries all the time. There was no pre-selecting queries that are likely to match like we have today.
2) Updates made to percolator queries were visible in realtime, Today these changes are visible in near realtime. So updating no longer requires the percolator to have the queries in jvm heap.

So having the percolator queries in jvm heap via the percolator cache is now less attractive. Especially when there are many percolator queries then these queries can consume many GBs of jvm heap.
Removing the percolator cache does make the percolate query slower compared to how the execution time in 5.0.0-alpha1 and alpha2, but it is still faster compared to 2.x and before.
2016-05-20 14:52:16 +02:00
Robert Muir b3c71c1e3a improve style for these constants 2016-05-20 08:42:29 -04:00
Clinton Gormley dafa78ec63 Revert "Doc: /_reindex: Add a note about the source size parameter"
This reverts commit 4de2848668.
2016-05-20 14:39:18 +02:00
Julien Pivotto 4de2848668 Doc: /_reindex: Add a note about the source size parameter
Closes #18484
2016-05-20 14:26:19 +02:00
Uwe Schindler 7bc91c00d9 More elegant way to force class initialization 2016-05-20 14:12:15 +02:00
javanna 63c5b31449 update shas for httpclient and httpcore 2016-05-20 14:10:55 +02:00
Uwe Schindler 6205f79554 Remove Definitions's copy-ctor; fix RuntimeClass to be unmodifiable
Please note: The maps inside the pirvate singleton instance of Defininition are no longer unmodifiable, but nothing from the outside can modify it! All private :-)
2016-05-20 14:03:46 +02:00
Christoph Büscher d3fe22c990 Improve adding clauses to `span_near` and `span_or` query
Currently the query builders expose the clauses of the span
query as a modifiable list. Instead we should make the that
getter return an unmodifiable list. Also renaming the method
used to add a clause from `clause(spanQuery)` to
`addClause(spanQuery)`.
2016-05-20 13:36:55 +02:00
Boaz Leskes 34ef5306d2 Snapshotting and sync could cause a dead lock TranslogWriter (#18481)
#18360 introduced an extra lock in order to allow writes while syncing the translog. This caused a potential deadlock with snapshotting code where we first acquire the instance lock, followed by a sync (which acquires the syncLock). However, the sync logic acquires the syncLock first, followed by the instance lock.

I considered solving this by not syncing the translog on snapshot - I think we can get away with just flushing it. That however will create subtleties around snapshoting and whether operations in them are persisted. I opted instead to have slightly uglier code with nest synchronized, where the scope of the change is contained to the TranslogWriter class alone.
2016-05-20 12:56:24 +02:00
Uwe Schindler 4ffa92c7c1 Remove the Definition instance passed around everywhere 2016-05-20 12:35:08 +02:00
Luca Cavanna fcee329332 update http client version to 4.5.2 and http-core 4.4.4 (#18399)
StrictHostnameVerifier can now be removed
2016-05-20 12:02:42 +02:00
Uwe Schindler 91f4bba042 Make Definition's public API completely static.
TODO: Remove Definition arguments everywhere and hide INSTANCE field!
2016-05-20 11:22:03 +02:00
Uwe Schindler f5fc60ac67 Add utility type constant 2016-05-20 11:05:40 +02:00
Jack Conradson 4e454439bb Fixed bugs in comparison with Def. Fixed may tests.n 2016-05-20 02:04:38 -07:00
eratio08 7e00a1c1a3 Added Type name for DFI (#18480) 2016-05-20 11:02:06 +02:00
Uwe Schindler 87ab39613d more constants 2016-05-20 10:56:50 +02:00
Uwe Schindler 82aed08301 Restore constants as static final (first step) 2016-05-20 10:48:41 +02:00
Jack Conradson 64e2ef5807 Removed transforms. No user-facing boxing. 2016-05-19 23:38:14 -07:00
Jack Conradson 3381f50e07 Merge branch 'master' into clean 2016-05-19 18:52:10 -07:00
Jack Conradson 3962553551 Removed user-facing boxing. 2016-05-19 18:51:55 -07:00
Uwe Schindler cfe555d216 move unused @SuppressWarnings one level up 2016-05-20 00:46:05 +02:00
Nik Everett 223cb6a7f0 [reindex] Mark test awaits fix because it is unstable
Fix coming.
2016-05-19 18:03:36 -04:00
Robert Muir afa9ebad28 dce 2016-05-19 16:03:11 -04:00
Robert Muir 0ee726ed0d nuke eclipse warnings 2016-05-19 15:35:26 -04:00
Robert Muir a569130368 fix typo 2016-05-19 15:28:59 -04:00
Robert Muir b9c7dbcfbd nuke overflow detection as we cannot guarantee for def. simplify life :) 2016-05-19 15:25:31 -04:00
Jason Tedor c257e2c51f Remove settings and system properties entanglement
Today when parsing settings during bootstrap, we add a system property
for every Elasticsearch setting. Additionally, settings can be set via
system properties. This commit simplifies this situation.
 - settings are no longer propogated to system properties
 - system properties can not be used to set settings
 - the "es." prefix on settings is no longer required (nor permitted)
 - test logging has a dedicated system property (tests.logger.level)

Relates #18198
2016-05-19 14:08:08 -04:00
Clinton Gormley 5da9e5dcbc Docs: Improved tokenizer docs (#18356)
* Docs: Improved tokenizer docs

Added descriptions and runnable examples

* Addressed Nik's comments

* Added TESTRESPONSEs for all tokenizer examples

* Added TESTRESPONSEs for all analyzer examples too

* Added docs, examples, and TESTRESPONSES for character filters

* Skipping two tests:

One interprets "$1" as a stack variable - same problem exists with the REST tests

The other because the "took" value is always different

* Fixed tests with "took"

* Fixed failing tests and removed preserve_original from fingerprint analyzer
2016-05-19 19:42:23 +02:00
Clinton Gormley dc33a83231 Remove the preserve_original option from the FingerprintAnalyzer (#18471)
The preserve_original option to the ASCIIFoldingFilter doesn't
play well with the FingerprintFilter, as it ends up producing
fingerprints like:

    "and consistent godel gödel is said sentence this yes"

The goal of the OpenRefine algorithm is to product a small normalized
ASCII fingerprint. There's no need to expose preserve_original.
2016-05-19 19:37:13 +02:00
Tanguy Leroux 8486488627 Disable DeleteByQueryRestIT delete_by_query/10_basic/Basic delete_by_query
Because of a REST test namespace conflict introduced by 18329. Issue tracked in 18469
2016-05-19 18:44:53 +02:00
Christoph Büscher d2515727d0 Improve random DateTimeZone creation in tests
We often require a random joda DateTimeZone in our tests. Currently
there are a few options for generating such a random DateTimeZone
from the set of available ids. Currently most random picks are not
really reproducable across different jvms because they rely on order
in the ids set implementation. The helper in DateProcessorFactoryTests
thus performs a sort on the set of ids before random picking from
the result, so I moved this to ESTestCase to make it publicly
available and changed all other tests to use that method.
2016-05-19 18:12:48 +02:00
Boaz Leskes 4d6887075f Log IndexShard.refresh logs under trace (#18435)
We log them every second...
2016-05-19 17:12:37 +02:00