Commit Graph

22281 Commits

Author SHA1 Message Date
David Pilato 871d7411cb Merge pull request #18616 from alexshadow007/patch-1
Update repository-gcs.asciidoc
2016-05-27 16:49:31 +02:00
Alexander Kazakov 8ff0077b52 Update repository-gcs.asciidoc
Fixed link
2016-05-27 17:44:58 +03:00
Jason Tedor df7b3c6e82 Fix translog replay multiple operations same doc
Modifying the translog replay to not replay again into the translog
introduced a bug for the case of multiple operations for the same
doc. Namely, since we were no longer updating the version map for each
operation, the second operation for a doc would be treated as a creation
instead of as an update. This commit fixes this bug by placing these
operations into version map. This commit includes a failing test case.

Relates #18611
2016-05-27 09:43:19 -04:00
Christoph Büscher f0020caf7c Merge pull request #18589: Improve TimeUnitRounding for edge cases and DST transitions 2016-05-27 15:37:20 +02:00
Simon Willnauer 98fd45dc02 Move DocStats under Engine to get more accurate numbers (#18587)
Today we pull doc stats from an index reader which might not reflect reality.
IndexWriter might have merged all deletes away but due to a missing refresh
the stats are completely off. This change pulls doc stats from the IndexWriter
directly instead of relying on refreshes to run regularly. Note: Buffered deletes
are still not visible until the segments are flushed to disk.
2016-05-27 15:31:40 +02:00
Yannick Welsch 2b47a2643c Only fail relocation target shard if failing source shard is a primary (#18574)
If the relocation source fails during the relocation of a shard from one node to another, the
relocation target is currently failed as well. For replica shards this is not necessary,
however, as the actual shard recovery of the relocation target is done via the primary shard.
2016-05-27 15:28:57 +02:00
Jason Tedor 123e40726e Fix bootstrap check docs
This commit fixes some incorrect links in the bootstrap check docs.
2016-05-27 09:19:49 -04:00
Christoph Büscher 29c970958c Adding tests for derivatives on date histogram aggregation with time zones 2016-05-27 15:18:11 +02:00
Christoph Büscher 4439a86cb8 Improve TimeUnitRounding for edge cases and DST transitions
Our current testing for TimeUnitRoundings rounding() and nextRoundingValue()
methods that are used especially for date histograms lacked proper randomization
for time zones. We only did randomized tests for fixed offset time zones
(e.g. +01:00, -05:00) but didn't account for real world time zones with
DST transitions.

Adding those tests revealed a couple of problems with our current rounding logic.
In some cases, usually happening around those transitions, rounding a value down
could land on a value that itself is not a proper rounded value. Also sometimes
the nextRoundingValue would not line up properly with the rounded value of all
dates in the next unit interval.

This change improves the current rounding logic in TimeUnitRounding in two ways:
it makes sure that calling round(date) always returns a date that when rounded
again won't change (making round() idempotent) by handling special cases happening
during dst transitions by performing a second rounding. It also changes the
nextRoundingValue() method to itself rely on the round method to make sure we
always return rounded values for the unit interval boundaries.

Also adding tests for randomized TimeUnitRounding that assert important basic
properties the rounding values should have. For better understanding and readability
a few of the pathological edge cases are also added as a special test case.
2016-05-27 15:18:11 +02:00
Jason Tedor 41710f1028 Upgrade joda-time to 2.9.4
This commit upgrades joda-time to version 2.9.4 to integrate a bug fix
there into Elasticsearch.

Relates #18609
2016-05-27 08:51:19 -04:00
javanna 1a298c2e6f Revert "Revert "Update the minimum required version of gradle to 2.13""
This reverts commit 0b965167fd.
All the CI machines have been updated to gradle 2.13, we should be ok upgrading the required minimum version.
2016-05-27 14:40:38 +02:00
Martijn van Groningen 0e9f3addd2 Nested inner hits shouldn't use relative paths
Like on other places in the query dsl the full field name should be used.
Before this change this wasn't the case for nested inner hits when source filtering was used.
Highlighting has a workaround, which is now removed as the source of nested inner hits can only be refered by the full name.

Closes #16653
2016-05-27 13:41:45 +02:00
javanna 0b965167fd Revert "Update the minimum required version of gradle to 2.13"
This reverts commit 8c6cbf0305. We need to update all our CI machines first, then get this change back in.
2016-05-27 13:16:43 +02:00
Luca Cavanna 5794108506 Merge pull request #18595 from javanna/enhancement/gradle_2.13
Update minimum gradle version and remove assumption around target compatibility
2016-05-27 12:35:00 +02:00
javanna 0e563b3fab Don't assume that we always compile for java 1.8 or 1.9
This change makes it possible to compile a separate project with e.g. targetCompatibility 1.7. Adds specific options (compact profile) only when compiling for >= 1.8.
2016-05-27 12:26:06 +02:00
javanna 8c6cbf0305 Update the minimum required version of gradle to 2.13
It came out with improvements around idea integration and language levels. This will make it possible to have the upcoming java client as a new project compiled against java 7 and have idea working on the right language level.
2016-05-27 12:26:06 +02:00
Jason Tedor cebbf0de41 Do not replay into translog on local recovery
When performing a local recovery, the engine replays operations
recovered from the translog into the translog again. These duplicated
operations are eventually cleared after successful recovery on flush,
but there is no need to play these operations into the translog at
all. This commit modifies the local recovery process so as to not replay
these operations into the translog.

Relates #18547
2016-05-27 06:04:11 -04:00
Jason Tedor 82713bab6d Add bootstrap check docs
This commit adds documentation for the bootstrap checks and provides
either links or inline guidance for setting the necessary settings to
pass the bootstrap checks.

Relates #18605
2016-05-27 06:03:35 -04:00
Boaz Leskes 318a4e3ef6 Introduce dedicated master nodes in testing infrastructure (#18514)
This PR changes the InternalTestCluster to support dedicated master nodes. The creation of dedicated master nodes can be controlled using a new `supportsMasterNodes` parameter to the ClusterScope annotation. If set to true (the default), dedicated master nodes will randomly be used. If set to false,  no master nodes will be created and data nodes will also be allowed to become masters. If active, test runs will either have 1 or 3 masternodes
2016-05-27 08:44:20 +02:00
Igor Motov fb763c1e8e Add ability to store results for long running tasks
The results of the tasks are stored in a special index .results
2016-05-26 19:49:13 -04:00
Robert Muir 3f06d9f3b8 Merge pull request #18600 from rmuir/new_script_exception
replace ScriptException with a better one
2016-05-26 17:51:34 -04:00
Jack Conradson cde83e363a Add an update script equivalent test. 2016-05-26 13:16:22 -07:00
Jason Tedor 7c3715e009 Remove a leftover "es." prefix from docs
This commit removes a leftover usage of the "es." in the CLI syntax in
the zip/targz docs.
2016-05-26 15:03:42 -04:00
Robert Muir 76ca4af561 move instanceof to catch block 2016-05-26 15:03:13 -04:00
Jason Tedor d23db39445 Merge pull request #18594 from jasontedor/plugins-cleanup
Plugins cleanup
2016-05-26 14:46:09 -04:00
Jason Tedor f16f65741e Fix when plugins directory is symlink
This commit fixes an issue with the plugins directory being a symbolic
link. Namely, the install plugins command attempts to always create the
plugins directory just in case it does not exist. The JDK method used
here guarantees that the directory is created, and an exception is not
thrown if the directory could not be created because it already
exists. The problem is that this JDK method does not respect symlinks so
its internal existence checks fails, it proceeds to attempt to create
the directory, but the directory creation fails because the symlink
exists. This is documented as being not an issue. We work around this by
checking if there is a symlink where we expect the plugins directory to
be, and only attempt to create if not. We add a unit test that plugin
installation to a symlinked plugins directory works as expected.
2016-05-26 14:10:32 -04:00
Yannick Welsch f98ca5310c Fix ReplicaShardAllocatorTests when unassigned reason is ALLOCATION_FAILED
When mocking unassigned shards which have failed with reason ALLOCATION_FAILED we
have to ensure that the failed allocation counter is strictly positive.
2016-05-26 19:01:43 +02:00
Ryan Ernst f5c0b34c90 Merge pull request #18601 from rjernst/distribution_readme
Use license, notice and readme files from root for distributions
2016-05-26 09:27:34 -07:00
Ryan Ernst 4735b5a5fa Build: Use license, notice and readme files from root for distributions
The distributions had their own copies of these extra files, which was a
carry over from maven. This change removes the duplicate files and
copies them from the root of the project.

closes #18597
2016-05-26 09:19:38 -07:00
Ryan Ernst d6b3816e4f Merge pull request #18599 from rjernst/remove_extraneous_readme
Remove extra mostly duplicate readme file
2016-05-26 09:12:31 -07:00
Ryan Ernst a8a38c282a Remove extra mostly duplicate readme file
It looks like the readme was duplicated when plugins were merged back
into the repo. We removed all these extra files from the plugins, this
removes the remaining duplicate from core.

closes #18597
2016-05-26 08:54:35 -07:00
Robert Muir f037807117 replace ScriptException with a better one 2016-05-26 11:43:29 -04:00
Jack Conradson f1ccc88f75 Merge pull request #18578 from jdconrad/ref
Add Function Reference Stub to Painless
2016-05-26 08:32:10 -07:00
Jason Tedor d29844e597 Remove custom plugins path
This commit removes the ability to specify a custom plugins
path. Instead, the plugins path will always be a subdirectory called
"plugins" off of the home directory.
2016-05-26 10:16:25 -04:00
Jason Tedor 0f529e10a8 Fix plugin command name in remove plugin command
This commit fixes the name of the plugin command that is output when a
user attempts to remove a plugin that does not exist.
2016-05-26 10:14:39 -04:00
Michael McCandless 1cf52c2663 Merge pull request #18590 from mikemccand/index_queue_limit_docs
Document the hard limits from on index and bulk thread pool sizes
2016-05-26 10:06:59 -04:00
Mike McCandless dbe0b42140 Document the hard limits from #15585 on index and bulk thread pool sizes 2016-05-26 09:40:22 -04:00
Yannick Welsch 31b0777c91 Simplify delayed shard allocation (#18351)
This commit simplifies the delayed shard allocation implementation by assigning clear responsibilities to the various components that are affected by delayed shard allocation:

- UnassignedInfo gets a boolean flag delayed which determines whether assignment of the shard should be delayed. The flag gets persisted in the cluster state and is thus available across nodes, i.e. each node knows whether a shard was delayed-unassigned in a specific cluster state. Before, nodes other than the current master were unaware of that information.
- This flag is initially set as true if the shard becomes unassigned due to a node leaving and the index setting index.unassigned.node_left.delayed_timeout being strictly positive. From then on, unassigned shards can only transition from delayed to non-delayed, never in the other direction.
- The reroute step is in charge of removing the delay marker (comparing timestamp when node left to current timestamp).
- A dedicated service DelayedAllocationService, reacting to cluster change events, has the responsibility to schedule reroutes to remove the delay marker.

Closes #18293
2016-05-26 13:39:55 +02:00
Adrien Grand cad959b980 Validate parameters of native sig score scripts so that we know which ones are not set. 2016-05-26 10:07:38 +02:00
Ryan Ernst 4a52dc9a8c Merge pull request #18581 from rjernst/staging_plugins
Plugins: Changing staging property to be the hash instead of a boolean
2016-05-25 15:07:46 -07:00
Ryan Ernst 16d029aff7 Merge branch 'master' into staging_plugins 2016-05-25 14:47:12 -07:00
Ryan Ernst 63549ec6f8 Update usage of es.staging.plugins sysprop to pass build hash 2016-05-25 14:44:56 -07:00
Ryan Ernst 9c15e0c56d Merge pull request #18583 from rjernst/official_plugins
Use resource files for list of modules and plugins
2016-05-25 14:42:24 -07:00
Ryan Ernst c951e03edc Remove unused line in official plugins test. 2016-05-25 14:38:10 -07:00
Ryan Ernst 45adab0cb8 Add test that x-pack is in official plugins list 2016-05-25 14:23:57 -07:00
Ryan Ernst 5e7b8d7788 Add test for official plugins list being sorted 2016-05-25 14:21:33 -07:00
Jason Tedor 9d39b05845 Remove deprecation suppression
Failing the build on deprecation warnings was removed in
19b3ec88af. This commit removes the
suppressed deprecation warnings so that their use is surfaced in the
build now.

Relates #18582
2016-05-25 17:15:36 -04:00
Ryan Ernst 718344f69b Merge pull request #18580 from rjernst/buildsrc_ide
Build: Remove buildSrc as a project in IDEs
2016-05-25 13:55:17 -07:00
Ryan Ernst a9e7bdc54c Plugins: use resource files for list of modules and plugins
This adds modules.txt and plugins.txt to the core jar resource files,
which the install plugin command statically loads, in place of the
previously hardcoded lists (which have often gone out of date).
2016-05-25 13:42:24 -07:00
Ryan Ernst 478877edf7 Plugins: Changing staging property to be the hash instead of a boolean
With the unified release, we will have staged releases based on a
unified hash (hash of all the hashes), so using the elasticsearch hash
for plugins staging will no longer work. This change makes the
`es.plugins.staging` property take the staging hash it should use.
2016-05-25 12:36:31 -07:00