Commit Graph

27287 Commits

Author SHA1 Message Date
Yannick Welsch 22e0795990 Extract batch executor out of cluster service (#24102)
Refactoring that extracts the task batching functionality from ClusterService and makes it a reusable component that can be tested in isolation.
2017-04-20 17:28:43 +02:00
Nik Everett a427d1dc5e Add 5.3.1 to bwc versions 2017-04-20 11:09:18 -04:00
Clinton Gormley ba552a0736 Added "release-state" support to plugin docs 2017-04-20 15:04:20 +02:00
Clinton Gormley 710cd05253 Added examples to cross cluster search of using cluster settings 2017-04-20 15:02:52 +02:00
Jason Tedor 446124b9d5 Reword note on whitespace in Log4j settings
This commit rewords the note on whitespace in Log4j settings to not
refer to only of the examples on the page, but instead be clear that the
note applies to all the examples on the page.
2017-04-20 07:34:30 -04:00
Jason Tedor 7a934bd6f4 Add note to docs on whitespace in Log4j settings
A confusing thing that can happen when configuring Log4j is that
extraneous whitespace throws off its configuration parsing yet the error
messages that arise give no indication that this is the problem. This
commit adds a note to the docs.

Relates #24198
2017-04-20 07:29:21 -04:00
Tanguy Leroux 55a879ee8d Align behavior or HDR percentiles iterator with percentile() method (#24206) 2017-04-20 12:37:33 +02:00
makeyang 0e322a7e0b Update TransportClient java documentation (#24205)
We are using now in master `TransportAddress` instead of `InetSocketTransportAddress`.
2017-04-20 10:35:35 +02:00
Nik Everett caf376c8af Start building analysis-common module (#23614)
Start moving built in analysis components into the new analysis-common
module. The goal of this project is:
1. Remove core's dependency on lucene-analyzers-common.jar which should
shrink the dependencies for transport client and high level rest client.
2. Prove that analysis plugins can do all the "built in" things by moving all
"built in" behavior to a plugin.
3. Force tests not to depend on any oddball analyzer behavior. If tests
need anything more than the standard analyzer they can use the mock
analyzer provided by Lucene's test infrastructure.
2017-04-19 18:51:34 -04:00
Ryan Ernst 151a65ed17 Ec2 Discovery: Cleanup deprecated settings (#24150)
This commit removes the deprecated cloud.aws.* settings. It also removes
backcompat for specifying `discovery.type: ec2`, and unused aws signer
code which was removed in a previous PR.
2017-04-19 12:06:10 -07:00
Jason Tedor 4796557a30 Add primary term to doc write response
This commit adds the primary term to the doc write response.

Relates #24171
2017-04-19 14:44:22 -04:00
Ryan Ernst e82d8007e3 Build: Add jstack output when starting integ test cluster if timeout occurs (#24193)
This commit adds a call to jstack to see where each node is stuck when
starting up, if a timeout occurs. This also decreases the timeout back
to 30 seconds.
2017-04-19 10:50:47 -07:00
Ali Beyad 3c82eea5fb Wait for cluster to become quiescent between REST tests (#24148)
[TEST] ensures REST tests wait for cluster state updates to finish
processing before moving to the next test
2017-04-19 13:17:09 -04:00
Ryan Ernst c7e9231a86 Plugins: Remove leniency for missing plugins dir (#24173)
This leniency was left in after plugin installer refactoring for 2.0
because some tests still relied on it. However, the need for this
leniency no longer exists.
2017-04-19 09:09:34 -07:00
Iliiaz Akhmedov 688fa309bc Changing some grammar in docs (#24164) 2017-04-19 08:49:13 -06:00
Christoph Büscher a9657a5a09 Add BucketMetricValue interface (#24188)
Unlike other implementations of InternalNumericMetricsAggregation.SingleValue,
the InternalBucketMetricValue aggregation currently doesn't implement a
specialized interface that exposes the `keys()` method. This change adds this so
that clients can access the keys via the interface.
2017-04-19 16:27:33 +02:00
Jim Ferenczi f05af0a382 Enable index-time sorting (#24055)
This change adds an index setting to define how the documents should be sorted inside each Segment.
It allows any numeric, date, boolean or keyword field inside a mapping to be used to sort the index on disk.
It is not allowed to use a `nested` fields inside an index that defines an index sorting since `nested` fields relies on the original sort of the index.
This change does not add early termination capabilities in the search layer. This will be added in a follow up.

Relates #6720
2017-04-19 14:36:11 +02:00
Dimitrios Liappis c0ac50eaa4 Clarify elasticsearch user uid:gid mapping in Docker docs
Elasticsearch runs as user elasticsearch with uid:gid 1000:1000 inside
the Docker container. Clarify that bind mounted local directories need
to be accessible by this user.

Relates #24092
2017-04-19 15:12:46 +03:00
Loek van Gool e11d892562 Update field-names-field.asciidoc (#24178)
fix typo in field name
2017-04-19 11:57:37 +02:00
Boaz Leskes 8758c541b3 ElectMasterService.hasEnoughMasterNodes should return false if no masters were found
This is a regression introduced in #20063
2017-04-19 09:52:06 +02:00
Tanguy Leroux e81bbc288a Remove Ubuntu 12.04 (#24161)
Ubuntu 12.04 will be EOL on April 28, 2017.
2017-04-19 09:39:42 +02:00
Tanguy Leroux 741c031384 [Test] Add unit tests for InternalHDRPercentilesTests (#24157)
Related to #22278
2017-04-19 09:37:01 +02:00
Areek Zillur 4f773e2dbb Replicate write failures (#23314)
* Replicate write failures

Currently, when a primary write operation fails after generating
a sequence number, the failure is not communicated to the replicas.
Ideally, every operation which generates a sequence number on primary
should be recorded in all replicas.

In this change, a sequence number is associated with write operation
failure. When a failure with an assinged seqence number arrives at a
replica, the failure cause and sequence number is recorded in the translog
and the sequence number is marked as completed via executing `Engine.noOp`
on the replica engine.

* use zlong to serialize seq_no

* Incorporate feedback

* track write failures in translog as a noop in primary

* Add tests for replicating write failures.

Test that document failure (w/ seq no generated) are recorded
as no-op in the translog for primary and replica shards

* Update to master

* update shouldExecuteOnReplica comment

* rename indexshard noop to markSeqNoAsNoOp

* remove redundant conditional

* Consolidate possible replica action for bulk item request
depanding on it's primary execution

* remove bulk shard result abstraction

* fix failure handling logic for bwc

* add more tests

* minor fix

* cleanup

* incorporate feedback

* incorporate feedback

* add assert to remove handling noop primary response when 5.0 nodes are not supported
2017-04-19 01:23:54 -04:00
Jason Tedor 9e0ebc5965 Rename variable in translog simple commit test
This commit renames a variable for clarity in the translog simple commit
test.
2017-04-18 23:43:25 -04:00
Jason Tedor 20181dd0ad Strengthen translog commit with open view test
This commit strengthens an assertion in the translog commit with open
view test.
2017-04-18 23:41:55 -04:00
Jason Tedor 180d1f2219 Stronger check in translog prepare and commit test
This commit strengthens an assertion in the translog prepare commit and
commit test.
2017-04-18 23:37:54 -04:00
Jason Tedor 23b224a5a9 Fix translog prepare commit and commit test
This test was terribly, horribly, no goodly, and badly broken it's
amazing it ever passed so this commit fixes it.
2017-04-18 23:32:47 -04:00
Glen Smith 3ff014d07d ingest-node.asciidoc - Clarify json processor (#21876)
Add examples for the json processor.
2017-04-18 23:27:26 -04:00
Nik Everett db0a5e4263 Painless: more testing for script_stack (#24168)
`script_stack` is super useful when debugging Painless scripts
because it skips all the "weird" stuff involved that obfuscates
where the actual error is. It skips Painless's internals and
call site bootstrapping.

It works fine, but it didn't have many tests. This converts a
test that we had for line numbers into a test for the
`script_stack`. The line numbers test was an indirect test
for `script_stack`.
2017-04-18 22:52:59 -04:00
Ryan Ernst 8f666a74f8 Test: Fix plugin integ test to depend on bundling plugin (#24170)
This was broken in the recent refactoring to add dependsOn directly to
cluster configuration.
2017-04-18 17:26:40 -07:00
Ryan Ernst 212f24aa27 Tests: Clean up rest test file handling (#21392)
This change simplifies how the rest test runner finds test files and
removes all leniency.  Previously multiple prefixes and suffixes would
be tried, and tests could exist inside or outside of the classpath,
although outside of the classpath never quite worked. Now only classpath
tests are supported, and only one resource prefix is supported,
`/rest-api-spec/tests`.

closes #20240
2017-04-18 15:07:08 -07:00
Boaz Leskes edff30f82a Engine: store maxUnsafeAutoIdTimestamp in commit (#24149)
The `maxUnsafeAutoIdTimestamp` timestamp is a safety marker guaranteeing that no retried-indexing operation with a higher auto gen id timestamp was process by the engine. This allows us to safely process documents without checking if they were seen before.

Currently this property is maintained in memory and is handed off from the primary to any replica during the recovery process.

This commit takes a more natural approach and stores it in the lucene commit, using the same semantics (no retry op with a higher time stamp is part of this commit). This means that the knowledge is transferred during the file copy and also means that we don't need to worry about crazy situations where an original append only request arrives at the engine after a retry was processed *and* the engine was restarted.
2017-04-18 20:11:32 +02:00
Simon Willnauer ab9884b2e9 Remove leniency when merging fetched hits in a search response phase (#24158)
Today when we merge hits we have a hard check to prevent AIOOB exceptions
that simply skips an expected search hit. This can only happen if there is a
bug in the code which should be turned into a hard exception or an assertion
triggered. This change adds an assertion an removes the lenient check for the
fetched hits.
2017-04-18 17:19:57 +02:00
Tanguy Leroux 829dd068d6 [Test] Use appropriate DocValueFormats in Aggregations tests (#24155)
Some aggregations (like Min, Max etc) use a wrong DocValueFormat in
tests (like IP or GeoHash). We should not test aggregations that expect
a numeric value with a DocValueFormat like IP. Such wrong DocValueFormat
can also prevent the aggregation to be rendered as ToXContent, and this
will be an issue for the High Level Rest Client tests which expect to be
able to parse back aggregations.
2017-04-18 17:03:32 +02:00
Nik Everett 0b15fde27a Start on custom whitelists for Painless (#23563)
We'd like to be able to support context-sensitive whitelists in
Painless but we can't now because the whitelist is a static thing.
This begins to de-static the whitelist, in particular removing
the static keyword from most of the methods on `Definition` and
plumbing the static instance into the appropriate spots as though
it weren't static. Once we de-static all the methods we should be
able to fairly simply build context-sensitive whitelists.

The only "fun" bit of this is that I added another layer in the
chain of methods that bootstraps `def` calls. Instead of running
`invokedynamic` directly on `DefBootstrap` we now `invokedynamic`
`$bootstrapDef` on the script itself loads the `Definition` that
the script was compiled against and then calls `DefBootstrap`.

I chose to put `Definition` into `Locals` so I didn't have to
change the signature of all the `analyze` methods. I could have
do it another way, but that seems ok for now.
2017-04-18 10:39:42 -04:00
Christoph Büscher 8f540346a9 Tests: Fixing typo in class name of InternalGlobalTests
Renaming from InternalGlogbalTests -> InternalGlobalTests
2017-04-18 16:27:15 +02:00
Suhas Karanth cee76295ca Update aggs reference documentation for 'keyed' options (#23758)
Add 'keyed' parameter documentation for following:
 - Date Histogram Aggregation
 - Date Range Aggregation
 - Geo Distance Aggregation
 - Histogram Aggregation
 - IP range aggregation
 - Percentiles Aggregation
 - Percentile Ranks Aggregation
2017-04-18 15:57:50 +02:00
Adrien Grand 4632661bc7 Upgrade to a Lucene 7 snapshot (#24089)
We want to upgrade to Lucene 7 ahead of time in order to be able to check whether it causes any trouble to Elasticsearch before Lucene 7.0 gets released. From a user perspective, the main benefit of this upgrade is the enhanced support for sparse fields, whose resource consumption is now function of the number of docs that have a value rather than the total number of docs in the index.

Some notes about the change:
 - it includes the deprecation of the `disable_coord` parameter of the `bool` and `common_terms` queries: Lucene has removed support for coord factors
 - it includes the deprecation of the `index.similarity.base` expert setting, since it was only useful to configure coords and query norms, which have both been removed
 - two tests have been marked with `@AwaitsFix` because of #23966, which we intend to address after the merge
2017-04-18 15:17:21 +02:00
Tanguy Leroux f217eb8ad8 Merge Percentile class with interface (#24154)
This commit merges the Percentile interface with the InternalPercentile
class, as we don't need to maintain both.
2017-04-18 14:47:18 +02:00
Martijn van Groningen edada2581e
[TEST] Added unittests for InternalSampler 2017-04-18 14:31:58 +02:00
Yannick Welsch 0b2cb68f6f [TEST] Randomly add and remove no_master blocks in IndicesClusterStateServiceRandomUpdatesTests
Checks that IndicesClusterStateService stays consistent with incoming cluster states that contain no_master blocks (especially
discovery.zen.no_master_block=all which disables state persistence). In particular this checks that active shards which have no in-memory data
structures on a node are failed.
2017-04-18 14:27:54 +02:00
Martijn van Groningen ac41fb2c4a
[TEST] Added test for GeoCentroidAggregator and
made constructors of GeoCentroidAggregator, GeoCentroidAggregatorFactory and InternalGeoCentroid package protected.
2017-04-18 13:54:31 +02:00
Jim Ferenczi 66202dcf51 Include missing field-caps docs in search 2017-04-18 10:31:35 +02:00
Ryan Ernst a8083f3d76 S3 Repository: Remove unused files (#24145)
These were leftover from the removal of the signer type setting in
2017-04-18 01:19:25 -07:00
Tanguy Leroux 81dbdb239f [Test] Add unit tests for InternalTDigestPercentilesTests (#24090) 2017-04-18 09:48:35 +02:00
BUPTAnderson a973197503 docs: fix search info in transport API docs (#22045)
fix some error!
2017-04-17 22:19:47 -04:00
Chris Earle 12c8423ec9 Warn on not enough masters during election (#20063)
This changes the trace level logging to warn, and adds the needed number to the message as well.

My fear is that it may get noisy, but this is an issue that you want to be noisy.
2017-04-17 22:18:28 -04:00
Sakthipriyan Vairamani dd3bbfb153 doc: highlight that doc counts come from lucene (#23522)
The docs don't clearly explain that the deleted doc count also comes from lucene.
IMHO, it is worth highlighting this information separately, as a Note.
Apart from that, there should be an official recommended alternative as well.
2017-04-17 21:52:29 -04:00
Emir Beganović f4f6ce4b91 Docs: fix some case problems in aliases.asciidoc (#23657)
Make more things uppercase.
2017-04-17 21:45:19 -04:00
Himanshu Bhandoh c53a2b870e Fixing typo in spelling of rollover (#24146)
rolllover -> rollover
2017-04-17 21:31:11 -04:00