Commit Graph

22319 Commits

Author SHA1 Message Date
Tanguy Leroux e7eb664c78 Change BlobPath.buildAsString() method 2016-05-23 10:50:40 +02:00
Tanguy Leroux b0b503035a Update reindex cancel tests 2016-05-23 10:31:14 +02:00
Adrien Grand c5a9edf1c7 Add `Character.MODIFIER_SYMBOL` to the list of symbol categories. #18402
Closes #18388
2016-05-23 10:11:35 +02:00
Jim Ferenczi 51d3fbf296 Merge pull request #18483 from jimferenczi/fix_only_nodes
Fix _only_nodes preferences
2016-05-23 10:03:44 +02:00
Jim Ferenczi 238d390637 Fixes for _only_nodes preferences:
* Handle multiple attributes/name (coma separated).
  * Shuffle the nodes that match the preferences.

Fix #12546
Fix #12700
2016-05-23 09:44:52 +02:00
Adrien Grand cb2cfdd9c0 Speed up named queries. #18470
Named queries have a performance bug when they are used with expensive queries
that need to perform a lot of work up-front like fuzzy or range queries
(including with points). The reason is that they currently re-create the weight
and scorer for every hit. Instead we should create weights exactly once and
use a single Scorer for all documents that are on the same segment.
2016-05-23 08:56:40 +02:00
Ryan Ernst 89a57bce5a Merge pull request #18512 from uschindler/forbiddenapis-2.1-update
Update to forbiddenapis 2.1
2016-05-22 15:43:45 -07:00
Uwe Schindler c706c46aec Update to forbiddenapis 2.1 2016-05-22 23:11:37 +02:00
Martijn van Groningen e714a04c67 docs: fix typo 2016-05-22 22:50:31 +02:00
Martijn van Groningen c1a0929123 percolator: Add support dor MatchNoDocsQuery in query terms extract service
Before the query extraction would have been aborted and the percolator query would be marked as unknown.
This resulted in a situation that these queries always need to be evaluated by the memory index at search time.
By adding support for this query many more percolator query candidate hits can skip the expensive memory index verification step. For example the `match` query parser returns a MatchNoDocsQuery if the query terms are removed by text analysis (lets query text only contained stop words).
2016-05-22 22:42:19 +02:00
G. Richard Bellamy cf54903580 Support full range of Java Long for epoch DateTime
Remove the arbitrary limit on epoch_millis and epoch_seconds of 13 and 10
characters, respectively. Instead allow any character combination that can
be converted to a Java Long.

Update the docs to reflect this change.
2016-05-22 13:08:20 -07:00
Ryan Ernst 7cf758943e Fix git info lookup to use correct dir where git exists 2016-05-21 22:58:55 -07:00
Ryan Ernst cec4b9a71c Merge pull request #18496 from rjernst/java9
Make java9 work again
2016-05-21 14:22:10 -07:00
Ryan Ernst 37d36f2f4c Merge branch 'master' into java9 2016-05-21 14:19:58 -07:00
Ryan Ernst f01f15d3b8 Document the hack 2016-05-21 14:14:12 -07:00
Jason Tedor ba14aca218 Refactor property placeholder use of env. vars
This commit is a slight refactoring of the use of environment variables
in replacing property placeholders. In commit
115f983827 the constructor for
Settings.Builder was made package visible to provide a hook for tests to
mock obtaining environment variables. But we do not need to go that far
and can instead provide a small hook for this for tests without opening
up the constructor. Thus, in this commit we refactor
Settings.Builder#replacePropertyPlaceholders to a package-visible method
that accepts a function providing environment variables by names. The
public-visible method just delegates to this method passing in
System::getenv and tests can use the package-visible method to mock the
behavior they need without relying on external environment variables.
2016-05-21 17:06:56 -04:00
Ryan Ernst 41a5c0cfa1 Force java9 log4j hack in testing 2016-05-21 13:41:38 -07:00
Ryan Ernst b26f5711d6 Fix log4j buggy java version detection 2016-05-21 13:18:12 -07:00
Ryan Ernst 1d40c4bbc1 Make java9 work again
This change makes ES compile with java9 again, build 118.
* There are a handful of changes due to failure to determine types during compile.
* The attachment plugins which use tika needed to have tika upgraded in order to pickup fixes there for java 9.
* azure discovery and s3 repository indirectly depend on jaxb, which is no longer in the default modules. They now add a jaxb dependency externally, and make JarHell allow for this package.
2016-05-21 09:41:51 -07:00
Lee Hinman ca033b42a9 Merge pull request #18503 from dakrone/remove-mkdir
Don't mkdir directly in deb init script
2016-05-20 23:04:33 -06:00
Lee Hinman 688254de41 Don't mkdir directly in deb init script
Elasticsearch will create the log and data path directories when it
starts, there is no need to do this in the init script

Resolves #18307
2016-05-20 15:52:16 -06:00
Lee Hinman 1d8441b681 Merge remote-tracking branch 'dakrone/remove-script-mode' 2016-05-20 15:22:14 -06:00
Jason Tedor 115f983827 Fix env. var placeholder test so it's reproducible
This commit modifies the settings test for environment variables
placeholders so that it is reproducible. The underlying issue is that
the set of environment variables from system to system can vary, and
this means that's we can never be sure that a failing test will be
reproducible. This commit simplifies this test to not rely on external
forces that could influence reproducibility.

Relates #18501
2016-05-20 17:11:37 -04:00
Lee Hinman fdfd2a2f18 Remove ScriptMode class in favor of boolean true/false
This removes the ScriptMode class entirely, which was an enum with two
options (ON and OFF) which essentially boiled down to true and false.
Now the boolean values are used instead.
2016-05-20 15:01:30 -06:00
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
Britta Weber b493f0defe skip all geo point queries in plain highlighter
Geo queries and plain highlighter do not seem to work well
together (https://issues.apache.org/jira/browse/LUCENE-7293)
so we need to skip all geo related queries when we highlight.

closes #17537
2016-05-20 20:07:10 +02: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
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