Commit Graph

14163 Commits

Author SHA1 Message Date
Simon Willnauer 8e07b4fba4 Throw LockObtainFailedException exception when we can lock index directory
Today we throw ElasticsearchException if we can't lock the index. This can cause
problems since some places where we have logic to deal with IOException on shard
deletion won't schedule a retry if we can't lock the index dir for removal. This
is the case on shadow replicas for instance if a shared FS is used. The result
of this is that the delete of an index is never acked.
2015-07-13 17:40:35 +02:00
Alex Ksikes 64f981fc32 Fix rewrite set twice in WildcardQueryParser
Closes #12207
2015-07-13 17:35:50 +02:00
Simon Willnauer 9faa3c6756 [TEST] ensure exceptions won't cause test to hang 2015-07-13 12:29:50 +02:00
Simon Willnauer 2e2bb25205 Only clear open search ctx if the index is delete or closed via API
A change in #12116 introduces closing / cleaning of search ctx even if
the index service was closed due to a relocation of it's last shard. This
is not desired since in that case it's fine to serve the pending requests from
the relocated shard. This commit adds an extra check to ensure that the index is
either removed (delete) or closed via API.
2015-07-13 11:34:34 +02:00
Simon Willnauer ca56d442bc remove dead code 2015-07-13 11:21:35 +02:00
Alexander Reelsen 195c8ec903 Term Query: Be more strict during parsing
The term query parser was too lenient during parsing and allowed to specify
more than one field, even though this expected to filter only for a single field.

This commit returns an exception if a query has been specified more than once.

Closes #12184
2015-07-13 09:59:30 +02:00
Andrew Selden 2ea45fd753 Merge pull request #12194 from aleph-zero/fix/12193
jsr166e was left out of shaded jar
2015-07-12 16:49:01 -07:00
Clinton Gormley e03374c733 Merge pull request #12136 from tylerjl/docs/upgrade_guide_plugins
[DOCS] Mention plugin version compatibility in upgrade guide
2015-07-12 13:26:21 +02:00
aleph-zero aba3730643 jsr166e was left out of shaded jar
The classes in com.twitter.jsr166e were not getting included in the
shaded jar due to a missing configuration line.

Closes #12193
2015-07-11 15:12:23 -07:00
Robert Muir 0b27dedac5 Merge pull request #12190 from rmuir/enforce_plugin_name
enforce plugins are installed with correct name, and install correctly in tests
2015-07-11 01:12:01 -04:00
Jack Conradson 82b112b911 Minor fix to a failing REST test due to the prior check-in. 2015-07-10 19:30:28 -07:00
Jack Conradson c1137b3b78 Add script type and script name to error messages
Modified ScriptEngineService to pass in a CompiledScript object
with newly added name and type member variables.
This can in turn be used to give better scripting error messages
with the type of script used and the name of the script.

Required slight modifications to the caching mechanism.

Note that this does not enforce good behavior in that plugins will
have to write exceptions that also output the name of the script
in order to be effective. There was no way to wrap the script
methods in a try/catch block properly further up the chain because
many have script-like objects passed back that can be run at a
later time.

closes #6653
closes #11449
2015-07-10 18:27:48 -07:00
Robert Muir c2c8956347 enforce plugins are installed with correct name, and install correctly in integ tests 2015-07-10 19:20:25 -04:00
Zachary Tong 8790989a47 [DOCS] Fix link to serial_diff docs 2015-07-10 19:01:18 -04:00
Zachary Tong bb9c160855 Merge pull request #11196 from polyfractal/feature/aggs_2_0_diff
Aggregations: add serial differencing pipeline aggregation
2015-07-10 18:26:19 -04:00
Zachary Tong e3f9d561e4 Aggregations: add serial differencing pipeline aggregation 2015-07-10 18:22:01 -04:00
Jay Modi c9042a5d2c Merge pull request #11890 from jaymode/cors
change CORS allow origin default to allow no origins
2015-07-10 14:48:26 -04:00
Clinton Gormley d9dfa9a24c Merge pull request #12183 from erichard/patch-1
Fix documentation typo
2015-07-10 19:15:56 +02:00
Joshua Rich 58f9839197 [DOCS] Simple patch to make creating aliases with glob patterns clearer
This PR is a simple doc patch to explicitly mention with an example of
how to create an alias using a glob pattern.  This comes up from
time-to-time with our customers and in the community and although
mentioned in the documentation already, is not obvious.

Also mention that the alias will not auto-update as indices matching the
glob change.

Closes #12175
Closes #12176
2015-07-10 18:58:28 +02:00
John Roesler f86e8c33c1 Docfix: ignore_above uses string length, not utf-8
ignore_above is used to guard against the lucene limitation
that a term cannot exceed 32766 bytes.

However, the implementation just used the character count, which
doesn't take into account the fact that some characters have
multi-byte utf-8 encodings.

This commit updates the docs to make this relationship clear.

Closes #11563
2015-07-10 18:47:21 +02:00
Martijn van Groningen 03148dc3b0 change visibility 2015-07-10 17:42:53 +02:00
Martijn van Groningen 512239041b fix npe 2015-07-10 17:12:51 +02:00
Martijn van Groningen 9eb11267f5 Merge pull request #12150 from martijnvg/aliases/remove_strict_filter_parsing
Don't require fields in alias filters to exist in the mapping
2015-07-10 16:50:51 +02:00
Clinton Gormley 6c0badd0b3 Docs: Updated the source field docs to remove deprecation of includes/excludes
Also provide warnings about why disabling source is probably something
you don't want to do

Closes #12141
2015-07-10 15:52:30 +02:00
Martijn van Groningen 52859e3a52 Internal: refactored MetaData to split the concrete index name resolution to IndexNameExpressionResolver.
Changes in a nutshell:
* All expression logic is now encapsulated by ExpressionResolver interface.
* MetaData#convertFromWildcards() gets replaced by WildcardExpressionResolver.
* All of the indices expansion methods are being moved from MetaData class to the new IndexNameExpressionResolver class.
* All single index expansion optimisations are removed.

The logic for resolving a concrete index name from an expression has been moved from MetaData to IndexExpressionResolver. The logic has been cleaned up and simplified were was possible without breaking bwc.

Also the notion of aliasOrIndex has been changed to index expression.

The IndexNameExpressionResolver translates index name expressions into concrete indices. The list of index name expressions are first delegated to the known ExpressionResolverS. An ExpressionResolver is responsible for translating if possible an expression into another expression (possibly but not required this can be concrete indices or aliases) otherwise the expressions are left untouched. Concretely this means converting wildcard expressions into concrete indices or aliases, but in the future other implementations could convert expressions based on different rules.

To prevent many overloading of methods, DocumentRequest extends now from IndicesRequest. All implementation of DocumentRequest already did implement IndicesRequest indirectly.
2015-07-10 15:18:28 +02:00
Simon Willnauer 75a51ede24 Allow rpm to be build as part of package phase
This allows the creation of the RPM artifact as part of the
maven package phase. The result of this is that we get checksum and
name correction for-free as it's all build an installed into the m2
repository. This also publishes the RPM together with .deb to the mvn
mirror.

Note: this will only build the RPM as part of the package phase if
`-Dpackage.rpm=true` since the binaries to build the RPM are not
availabel on all platforms.
2015-07-10 14:43:47 +02:00
Simon Willnauer 164212940b Free all pending search contexts if index is closed or removed
Today we only clear search contexts for deleted indies. Yet, we should
do the same for closed indices to ensure they can be reopened quickly.

Closes #12116
2015-07-10 14:27:53 +02:00
Colin Goodheart-Smithe fcf8d2408f Aggregations: Adds new script API to ValuesSourceMetricsAggregationBuilder
A method for the new Script API were missing in the ValuesSourceMetricsAggregationBuilder. This change adds the missing method and deprecates the old Script API methods
2015-07-10 13:09:31 +01:00
Simon Willnauer 0eb9f07f0e Calculate artifact checksums in maven
Today we calculate the checksums in a python scritp to do the release.
We can also do this way simpler in maven using an ant task.
2015-07-10 13:30:31 +02:00
szroland 2c453820e4 Treat path object as a simple value objects instead of Iterable in XContentBuilder, using toString() to create String representation.
This addresses #11771
2015-07-10 10:55:43 +02:00
David Pilato 7c3ea748e2 [test] list of plugins should have well-defined order
We now return list of plugins sorted by name.

Closes #12174.
2015-07-10 10:25:15 +02:00
Boaz Leskes 28090b3d73 Allocation: Shard Started messages should be matched using an exact match
When a node sends a shard started message to the master, the master goes through the routing table looking for the shard to start. At the moment we validate the indexUUID, the node the shard is assigned to and the fact that the shard is initializing. This check goes wrong if a relocating replica shard finishes recovery just at the moment the source node  leaves the cluster. In this case the master will cancel the recovery and will likely assign a new initializing replica to the same target node. In this case the message from the relocation recovery can activate the new replica wrongfully.

Also, the logic for decided whether an incoming shard started message will be applied was split between ShardStateAction and the AllocationService.
This commit does the following:
1) Let ShardStateAction only filter basic stuff like index existence and indexUUID.
2) Move the trickier shard started matching logic to the AllocationService and make it stricter
3) Unify ShardStateAction filtering logic for both shard started and shard failed.
4) Add unit tests for all of the above.

For an example test failure see: http://build-us-00.elastic.co/job/es_core_16_centos/388/

Closes #11999
2015-07-10 08:49:31 +03:00
Robert Muir 5b4e86389c fix broken usage of path api 2015-07-10 01:02:13 -04:00
Ryan Ernst 5d059313dc appease maven warnings about using ${version} in pom 2015-07-09 13:38:15 -07:00
Simon Willnauer 0ea9adb284 [TEST] Assert against minCompatVersion instead of a static string 2015-07-09 21:47:17 +02:00
Ryan Ernst 59d6e59dec silence symlink test on windows 2015-07-09 12:41:48 -07:00
Simon Willnauer e0708813a9 Make 2.0.0.beta1-SNAPSHOT the current version.
Today everything is tight to having the next version as the latest.
In order to work towards 2.0.0.beta1 we need to fix all the usage of
2.0.0-SNAPSHOT to reflect the version we will release soon.
Usually we do this on the release branch but to simplify things I wanna
keep this on master for now and move to 2.1.0-SNAPSHOT on master once
we created a 2.0 branch.

Closes #12148
2015-07-09 21:24:32 +02:00
Tanguy Leroux 26df78a90a Fix REST test for cat.nodes (Windows load average OS stats return -1.00) 2015-07-09 19:52:52 +02:00
Tyler Langlois fd63080f65 [DOCS] Clarify that non-_site plugins likely need upgrading 2015-07-09 10:56:31 -06:00
Igor Motov f303a1d4eb Snapshot info should contain version of elasticsearch that created the snapshot
This information was stored with the snapshot but wasn't available on the interface. Knowing the version of elasticsearch that created the snapshot can be useful to determine the minimal version of the cluster that is required in order to restore this snapshot.

Closes #11980
2015-07-09 12:02:33 -04:00
jaymode ee30cf32ab strip elasticsearch- and es- from any plugin name
#12158 only partially fixed #12143 by removing the prefix from official plugin names. This change
removes the prefixes from any plugin names.
2015-07-09 11:50:41 -04:00
johnfrederik a821c558d3 Docs: Update scripting.asciidoc
removed underscore for "_doc" to "doc"

Closes #12088
2015-07-09 17:28:20 +02:00
Jay Modi ef4c255e37 Merge pull request #12158 from jaymode/plugin_name_prefix
remove elasticsearch- from name of official plugins
2015-07-09 11:26:17 -04:00
jaymode 3fd9f4b82e remove elasticsearch- from name of official plugins
This change fixes the plugin manager to trim `elasticsearch-` and `es-` prefixes from plugin names
for our official plugins. This restores the old behavior prior to #11805.

Closes #12143
2015-07-09 11:09:12 -04:00
Robert Muir e4b355b790 Merge pull request #12157 from rmuir/plugin_permissions
Fix pluginmanager permissions for bin/ scripts
2015-07-09 10:50:48 -04:00
Robert Muir dfbe108902 Fix pluginmanager permissions for bin/ scripts
Today it will remove all permissions and only set execute bit:

    ---x--x--x

Instead we should preserve existing permissions, and just add
read and execute to whatever is there.

Closes #12142
2015-07-09 10:39:58 -04:00
Jay Modi 15d62713b1 Merge pull request #12155 from jaymode/external_test_cluster_settings
allow settings to be passed to client for external test cluster
2015-07-09 09:57:17 -04:00
jaymode a3e30a89a7 allow settings to be passed to client for external test cluster
This change allows custom settings to be passed to the client for the external test cluster,
which is necessary when additional settings need to be passed to the client in order to
properly communicate with the external test cluster.
2015-07-09 09:27:47 -04:00
Adrien Grand e406baf59e Merge pull request #11800 from arcz/master
Fix indentation in deb init script
2015-07-09 15:07:42 +02:00
Martijn van Groningen aa22e23316 added breaking docs 2015-07-09 12:07:49 +02:00