Commit Graph

22437 Commits

Author SHA1 Message Date
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
David Pilato 1d75ee6fb9 Merge branch 'master' into azure/fix-delete 2016-05-20 16:12:30 +02:00
David Pilato 6772517f4d Cleanup the PR and apply advices from the review
* ESBlobStore tests must move to the test framework if we want to be able to reuse them in the context of plugins.
* To be able to identify more easily what are Integration Tests vs Unit Tests, this commit renames `*AzureTestCase` to `*AzureIntegTestCase`.
* Move some debug level logs to trace level
* Collapse when possible identical catch blocks
* `blobNameFromUri()` does not need anymore to get the container name. We just split the URI after 3 `/` and simply get the remaining part.
* Added a Unit test for that
* As we renamed some existing classes, checkstyle is now complaining about the lines width.
* While we are at it, let's replace all calls to `execute().actionGet()` with `get()`
* Move `readSettingsFromFile()` in a Util class. Note that this class might be useful for other plugins (S3/EC2/Azure-discovery for instance) so may be we should move it to the test framework?
* Replace some part of the code with lambdas
2016-05-20 16:04:39 +02: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
Christoph Büscher 757ccf00b2 Enforce MatchQueryBuilder#maxExpansions() to be strictly positive 2016-05-19 16:59:37 +02:00
Tanguy Leroux a01ecb20ea Port Delete By Query to Reindex infrastructure
closes #16883
2016-05-19 16:07:50 +02:00
Jeff Evans 3cf4214255 Add better error message when analyzer created without tokenizer or analyzer type (#18455)
Closes #15492
2016-05-19 15:47:07 +02:00
Robert Muir 915ab16176 First steps at whitelist cleanup 2016-05-19 09:29:48 -04:00
Ali Beyad fc6df23fea Rename AggregatorBuilder and all of its subclasses to
AggregationBuilder, in keeping consistent with the Java APIs.

Closes #18377
Closes #18367
2016-05-19 09:25:29 -04:00
Tanguy Leroux 35d3bdab84 Add Google Cloud Storage repository plugin
Closes #12880
2016-05-19 13:26:23 +02:00
Martijn van Groningen e2691d7e5c test: Don't generate a value of 0, because FuzzyQuery constructor does't allow that 2016-05-19 13:08:30 +02:00
Martijn van Groningen 050145f61b parent/child: Allow adding additional child types that point to an existing parent type
From 2.0 adding child types to existing types was forbidden because the`_parent` field stores the join between parent and child at index time.
This is to protect from the fact that types that weren't a parent before become a parent while previously indexed documents would not have a join field.
 This would break the parent/child queries.

The restriction was a bit too strict in the sense that also if a type was a parent type the restriction would forbid adding child types that point to a parent type (so child points already point to it).
This change make sure that the restriction only applies if that type isn't a parent type already.

Closes #17956
2016-05-19 11:05:17 +02:00