Commit Graph

23970 Commits

Author SHA1 Message Date
Nik Everett ffd226efa0 Add `// NOTCONSOLE` to docs
We have 1074 snippets that look like they should be converted to
`// CONSOLE`. At least that is what `gradle docs:listConsoleCandidates`
says. This adds `// NOTCONSOLE` to explicitly mark snippets that
*shouldn't* be converted to `// CONSOLE`. After marking the blindingly
obvious ones this cuts the remaining snippet count to 1032.
2016-08-12 16:49:57 -04:00
Lee Hinman f832eaa6d2 Merge remote-tracking branch 'dakrone/handle-groovy-errors-better' 2016-08-12 13:07:13 -06:00
Lee Hinman aab8c1f032 Catch AssertionError and NoClassDefFoundError in groovy scripts
Previously, we only caught subclasses of Exception, however, there are
some cases when Errors are thrown instead of Exceptions. These two cases
are `assert` and when a class cannot be found.

Without this change, the exception would bubble up to the
`uncaughtExceptionHandler`, which would in turn, exit the JVM
(related: #19923).

A note of difference between regular Java asserts and Groovy asserts,
from http://docs.groovy-lang.org/docs/latest/html/documentation/core-testing-guide.html

"Another important difference from Java is that in Groovy assertions are
enabled by default. It has been a language design decision to remove the
possibility to deactivate assertions."

In the event that a user uses an assert such as:

```groovy
def bar=false; assert bar, "message";
```

The GroovyScriptEngineService throws a NoClassDefFoundError being unable
to find the `java.lang.StringBuffer` class. It is *highly* recommended
that any Groovy scripting user switch to using regular exceptions rather
than unconfiguration Groovy assertions.

Resolves #19806
2016-08-12 13:06:49 -06:00
javanna efc32746eb fix typo getMovingAverageMdelParserRegistry->getMovingAverageModelParserRegistry in SearchModule 2016-08-12 20:33:06 +02:00
javanna 20e4fed65c fix javadocs for SearchExtensionSpec 2016-08-12 20:30:08 +02:00
Areek Zillur a4f4525955 Merge pull request #19969 from chengpohi/master
fix CompletionSuggestion test failed caused by shard is 1
2016-08-12 14:20:21 -04:00
Clinton Gormley 8e5ee2c6d5 RESTART_ON_UPGRADE incorrectly named ES_RESTART_ON_UPGRADE in sysconfig (#19976)
Closes #19950
2016-08-12 19:19:30 +02:00
Xiang Chen 77f28dbdde fix CompletionSuggestion test failed caused by shard is 1 2016-08-13 00:20:46 +08:00
Clinton Gormley 15c96df5b5 Replaced "true" with true in snapshot restore docs
Closes #19947
2016-08-12 16:56:56 +02:00
Yannick Welsch 35e4f24467 Remove dead code that promotes replica relocation target to primary (#19973)
If a primary fails, an active replica is promoted to primary. Once we do the promotion, however, we are sure that the active replica is not relocating anymore. The reason is that when the primary fails, we first remove/cancel all initializing replicas (also if they are relocation targets). This is the only safe thing to do anyhow, because promoting relocating replica to primary would also mean that the replica recovery of the replica relocation target is suddenly promoted to primary relocation, which the recovery code treats in a different way.
2016-08-12 16:42:10 +02:00
Jun Ohtani 8d4bc0b2a8 Merge pull request #19929 from johtani/fix/stop_using_cached_components_in_analyze_api
Stop using cached component in _analyze API
2016-08-12 23:00:54 +09:00
Jim Ferenczi 452691ae9d Merge pull request #19949 from jimferenczi/slow_log_search
Add shardId and node name in search slow log
2016-08-12 15:33:43 +02:00
Jim Ferenczi bf312f4203 Add the shard ID and the node name in the output of the search slow log.
This change outputs '[nodeName] [indexName][shardId]' instead of [indexName/indexUUID]

closes #19735
2016-08-12 15:32:40 +02:00
Jason Tedor 1f0673c9bd Default max local storage nodes to one
This commit defaults the max local storage nodes to one. The motivation
for this change is that a default value greather than one is dangerous
as users sometimes end up unknowingly starting a second node and start
thinking that they have encountered data loss.

Relates #19964
2016-08-12 09:26:20 -04:00
Jun Ohtani 2cde3b07cd Stop using cached component in _analyze API
Add javadoc some methods

Closes #19827
2016-08-12 21:54:45 +09:00
Jim Ferenczi c9722c4b08 Merge pull request #19972 from jimferenczi/dfs_explain
Fix explain output for dfs query
2016-08-12 12:22:13 +02:00
Jim Ferenczi b73751a4b5 Fix explain output for dfs query
ContextIndexSearcher#explain ignores the dfs data to create the normalized weight.
This change fixes this discrepancy by using the dfs data to create the normalized weight when needed.
2016-08-12 12:14:38 +02:00
Nik Everett 9f8f2ea54b Remove ESIntegTestCase#pluginList
It was a useful method in 1.7 when javac's type inference wasn't as
good, but now we can just replace it with `Arrays.asList`.
2016-08-11 15:44:02 -04:00
Gytis Šk 8a97f05e41 Fix typos in inner-hits documentation (#19910) 2016-08-11 21:15:11 +02:00
Luca Cavanna a80a35ebc4 Merge pull request #19961 from javanna/fix/reindex_repleaceable
update and delete by query requests to implement IndicesRequest.Replaceable
2016-08-11 21:10:58 +02:00
Tal Levy bf046f8f93 update ingest date index name processor with runnable CONSOLE examples (#19935) 2016-08-11 11:36:14 -07:00
javanna 2f360ecc16 fix typo and make parseIndexConstraints method static in FieldStatsRequest 2016-08-11 20:29:27 +02:00
Ali Beyad 50b31ce620 Remove //norelease from IndexWithShadowReplicasIT test that checks
asserts the indices directory is deleted on index deletion, as we
are no longer considering it a blocker for releasing.

Relates #17695
2016-08-11 13:07:39 -04:00
javanna 4424d2263f UpdateByQueryRequest to implement IndicesRequest.Replaceable rather than CompositeIndicesRequest
Update by query is a shortcut to search + index. UpdateByQueryRequest gets serialized on the transport layer only when the transport client is used. Given that the request supports wildcards and allows to set its indices, it should implement IndicesRequest.Repleaceable. implementing CompositeIndicesRequest makes little sense as the indices that the request works against depend entirely on the inner search request.
2016-08-11 18:11:26 +02:00
javanna 11d770dde3 DeleteByQueryRequest to implement IndicesRequest.Replaceable
Delete by query is a shortcut to search + delete. DeleteByQueryRequest gets serialized on the transport layer only when the transport client is used. Given that the request supports wildcards and allows to set its indices, it should implement IndicesRequest.Repleaceable
2016-08-11 18:11:26 +02:00
Jason Tedor d7dbb2b595 Fix handling of spaces for jvm.options on Windows
This commit fixes the handling of spaces in the path to the jvm.options
file on Windows. The issue is that the extraneous set of quotes were
included as part of the value of ES_JVM_OPTIONS thus confusing further
downstream commands.

Relates #19951
2016-08-11 11:23:22 -04:00
Nik Everett e07e5d66fa Make reindex and lang-javascript compatible
Fixes two issues:
1. lang-javascript doesn't support `executable` with a `null` `vars`
parameters. The parameter is quite nullable.
2. reindex didn't support script engines who's `unwrap` method wasn't
a noop. This didn't come up for lang-groovy or lang-painless because
both of those `unwrap`s were noops. lang-javascript copys all maps that
it `unwrap`s.

This adds fairly low level unit tests for these fixes but dosen't add
an integration test that makes sure that reindex and lang-javascript
play well together. That'd make backporting this difficult and would
add a fairly significant amount of time to the build for a fairly rare
interaction. Hopefully the unit tests will be enough.
2016-08-11 09:54:03 -04:00
Colin Goodheart-Smithe 2904562b01 [DOCS] Fix shard request cache docs
Docs have been changed to reflect the fact that shard request cache is now enabled by default

Closes #19695
2016-08-11 14:25:34 +01:00
Yannick Welsch 522b137097 Make NetworkPartition disruption scheme configurable (#19534)
This commit separates the description of the links in the network that are to be disrupted from the failure that is to be applied to the links (disconnect/unresponsive/delay). Previously we had subclasses for the various kind of network disruption schemes combining on one hand failure mode (disconnect/unresponsive/delay) as well as the network links to cut (two partitions / bridge partitioning) into a single class.
2016-08-11 14:55:06 +02:00
Yannick Welsch 4b33d8bb94 Mute test CompletionSuggestionTests.testToReduce
Relates to #19896
2016-08-11 14:46:12 +02:00
Jim Ferenczi 6130677a96 Merge pull request #19945 from jimferenczi/ttl_version_lookup
Remove useless PK lookup in IndicesTTLService
2016-08-11 14:19:03 +02:00
Jim Ferenczi e8be32ed6d Merge pull request #19944 from jimferenczi/version_lookup
VersionFetchSubPhase should not use Versions#loadDocIdAndVersion
2016-08-11 12:40:49 +02:00
Clinton Gormley 2e3bc656e6 Update inner-hits.asciidoc
Typo

Closes #19775
2016-08-11 12:36:31 +02:00
Jim Ferenczi 729f443199 Remove useless PK lookup in IndicesTTLService
This is a follow up of https://github.com/elastic/elasticsearch/pull/19944#issuecomment-239119859
Since the docid is known we can directly access the version doc value.
2016-08-11 12:30:22 +02:00
Jim Ferenczi 1f75d05a2a VersionFetchSubPhase should not use Versions#loadDocIdAndVersion
Since we already know the docId, the PK lookup is useless and we can directly get the value from the numeric doc values.
2016-08-11 11:39:01 +02:00
Yannick Welsch a1538de1a1 [TEST] Leave default ping timeouts on tests that don't simulate network failures
Reducing the ping timeouts on a test that does not simulate network failures can cause node disconnects within the test on a slow CI machine.
The test testSearchWithRelocationAndSlowClusterStateProcessing does not expect such disconnects, leading to shard relocation in the test to abort prematurely.
2016-08-11 11:05:38 +02:00
Jason Tedor c3253130d4 Mark halting the virtual machine as privileged
Today in the uncaught exception handler, we attempt to halt the virtual
machine on fatal errors. Yet, halting the virtual machine requires
privileges which might not be granted to the caller when the exception
is thrown for example from a scripting engine. This means that if an
OutOfMemoryError or another fatal error is hit inside a script, the
virtual machine will not exit because the halt call will be denied for
securiry privileges. In this commit, we mark this halt call as trusted
so that the virtual machine can be halted if a fatal error is
encountered in a script.

Relates #19923
2016-08-10 21:22:53 -04:00
Jack Conradson a5008bbb78 Merge pull request #19936 from jdconrad/errors
Catch OutOfMemory and StackOverflow errors in Painless
2016-08-10 18:20:00 -07:00
Jack Conradson f38d64039b Catch OutOfMemory and StackOverflow errors in Painless since it's safe
to do so.
2016-08-10 18:09:45 -07:00
Ryan Ernst 82fc86553c remove dots in field names tests for mapping api 2016-08-10 17:11:02 -07:00
Ryan Ernst 9e6629d092 Merge pull request #19899 from rjernst/dots_in_mapper_names
Mappings: Support dots in field names in mapping parsing
2016-08-10 16:44:08 -07:00
Ryan Ernst 58c15f01b5 Merge branch 'master' into dots_in_mapper_names 2016-08-10 15:41:23 -07:00
Ryan Ernst d89540be9c Add rest put mapping test with dot in fieldname 2016-08-10 15:35:53 -07:00
Nik Everett 3793d0573e Add complete examples to ingest-geoip docs
Adds `// CONSOLE` and example responses to both make usage more clear
and to test the snippets.

Relates to #18160
2016-08-10 17:13:15 -04:00
Ali Beyad 04e8272607 Fixes netty4 module's CORS config to use defaults (#19874)
Fixes netty4 CORS config to use defaults for `http.cors.allow-methods`
and `http.cors.allow-headers` when none are specified.
2016-08-10 16:47:21 -04:00
Luca Cavanna 8a0d71924c Merge pull request #19926 from javanna/enhancement/threadcontext_cleanup
Reduce ThreadContext's inner classes visibility
2016-08-10 20:38:33 +02:00
Jun Ohtani f63fcefbd0 Stop using cached component in _analyze API
Stop calling tokenizer/tokenFilters/chaFilter method of IndexService
Add some getAnalysisProvider methods
Change SynonymTokenFilterFactory constructor

Closes #19827
2016-08-11 02:41:34 +09:00
Christoph Büscher 563bf0154c Merge pull request #19920 from cbuescher/remove-SuggestUtil
Remove SuggestUtil helper class
2016-08-10 19:22:22 +02:00
David Pilato acc50d5817 Update documentation after merge with master 2016-08-10 19:07:22 +02:00
David Pilato 42f851cf49 Merge branch 'master' into fix/19924-attachment 2016-08-10 19:05:22 +02:00