Commit Graph

14173 Commits

Author SHA1 Message Date
Andrzej Wisłowski 7b4824f318 fix github source link 2015-07-14 10:14:15 +02:00
Robert Muir 6c466ed0d8 Merge pull request #12221 from rmuir/version_hell
fail plugins on version mismatch
2015-07-13 21:46:09 -04:00
Robert Muir 5d48f93557 fail plugins on version mismatch 2015-07-13 21:01:39 -04:00
Ryan Ernst fd6bc9fc57 tests: explicitly disable security manager for maven integration tests 2015-07-13 17:09:06 -07:00
Ryan Ernst 2628ecfacf Merge pull request #12219 from rjernst/fix/integ-test-exceptions
Tests: Explicitly use newer junit runner for maven integ tests
2015-07-13 15:37:34 -07:00
Ryan Ernst adfd55bf89 Tests: Explicitly use newer junit runner for maven integ tests
The older runner (junit 4.0?) hides exceptions in static initialization
(and runs the tests anyways!). With this change, the actual cause
of the recent windows integ test failures with security manager
are shown.
2015-07-13 15:33:02 -07:00
uboness 686413771c Removed duplication in parent pom
Found 2 definition for  `maven-install-plugin`
2015-07-13 22:40:18 +02:00
Boaz Leskes d12fb5f725 Add MetaData.clusterUUID to ClusterState.toXContent
The MetaData.clusterUUID is guaranteed to be unique across clusters and is handy (which may or may not have the same human readable cluster name).

Closes #11832
2015-07-13 20:31:11 +02:00
uboness b40186652c updated the elasticsearch versioning format
Moving to from `X.Y.Z.beta1`/`X.Y.Z.RC1` to `X.Y.Z-beta1`/`X.Y.Z-rc1`
2015-07-13 20:26:37 +02:00
Boaz Leskes 17906ca7d6 Rename MetaData.uuid -> MetaData.clusterUUID and IndexMetaData.uuid-> IndexMetaData.indexUUID
As explained in #11831, we currently have uuid fields on the cluster state, meta data and index metadata. The latter two are persistent across changes are being effectively used as a persistent uuid for this cluster and a persistent uuid for an index. The first (ClusterState.uuid) is ephemeral and changes with every change to the cluster state. This is confusing,

We settled on having the following, new names:

-> ClusterState.uuid -> stateUUID (transient)
-> MetaData.uuid -> clusterUUID (persistent)
-> IndexMetaData.uuid -> indexUUID (persistent).

Closes #11914
Closes #11831
2015-07-13 20:15:54 +02:00
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