Commit Graph

2091 Commits

Author SHA1 Message Date
Jason Tedor 18b32f0ba5 Remove cache concurrency level settings that no longer apply
This commit removes some cache concurrency level settings that were
applicable when the cache was backed by the Guava cache implementation,
but no longer apply with the cache implementation completed in #13717.

Relates #7836, relates #13224, relates #13717
2015-10-20 10:15:03 -04:00
Jason Tedor 1b461a7f9d Remove mistakenly committed build output files
This commit removes some build output files from the
burn_maven_with_fire_branch that appear to have been mistakenly
committed to master in bfb9054a11.
2015-10-20 08:34:51 -04:00
Robert Muir c037a67988 Drop ability to execute on Solaris
This is very simple to do and recommended by `privileges(5)` documentation:
```
Daemons that never need to exec subprocesses should remove the PRIV_PROC_EXEC privilege from their permitted and limit sets.
```

Closes #14200
2015-10-20 08:10:44 -04:00
Simon Willnauer fc38c147de Remove dead code 2015-10-20 13:59:53 +02:00
Isabel Drost-Fromm 4adf7c3d86 Fix the naming check. 2015-10-20 11:17:33 +02:00
Isabel Drost-Fromm 4338ffc8a7 Merge pull request #14189 from MaineC/doc-fix/13800
Updates java query dsl documentation
2015-10-20 10:56:43 +02:00
Isabel Drost-Fromm 5fbf49a0fb Minus 16 calls to getMessage
Adds *Exception(Throwable cause) constructors and calls them where appropriate
thus getting rid of 16 instances of calling getMessage and eliminating the risk
of loosing exception context.

Fixes ElasticsearchTimeoutException along the way (used to discard the
parameter args in the (String message, Object... args) constructor, passes it
up to super now.

Relates to #10021
2015-10-20 09:55:53 +02:00
Isabel Drost-Fromm dac88c0281 Updates java query dsl documentation
Closes #13800
2015-10-20 09:37:36 +02:00
Nicholas Knize 6d3dd727c2 Resync Geopoint hashCode/equals method
Geopoint's equals method was modified to consider two points equal if they are within a threshold. This change was done to accept round-off error introduced from GeoHash encoding methods. This commit removes this trappy leniency from the GeoPoint equals method and instead forces round-off error to be handled at the encoding source.
2015-10-19 14:52:31 -05:00
Jason Tedor 2668bdc42e Rename ShardReplicationTests to TransportReplicationActionTests
This commit renames ShardReplicationTests to
TransportReplicationActionTests. This rename is to reflect the fact
that the tests contained in this test suite are for testing
TransportReplicationAction. This class was previously renamed but the
test suite was not.
2015-10-19 11:14:14 -04:00
Nik Everett 1cb3068737 Make root_cause of field conflicts more obvious
Does so by improving the error message passed to MapperParsingException.

The error messages for mapping conflicts now look like:
```
{
  "error" : {
    "root_cause" : [ {
      "type" : "mapper_parsing_exception",
      "reason" : "Failed to parse mapping [type_one]: Mapper for [text] conflicts with existing mapping in other types:\n[mapper [text] has different [analyzer], mapper [text] is used by multiple types. Set update_all_types to true to update [search_analyzer] across all types., mapper [text] is used by multiple types. Set update_all_types to true to update [search_quote_analyzer] across all types.]"
    } ],
    "type" : "mapper_parsing_exception",
    "reason" : "Failed to parse mapping [type_one]: Mapper for [text] conflicts with existing mapping in other types:\n[mapper [text] has different [analyzer], mapper [text] is used by multiple types. Set update_all_types to true to update [search_analyzer] across all types., mapper [text] is used by multiple types. Set update_all_types to true to update [search_quote_analyzer] across all types.]",
    "caused_by" : {
      "type" : "illegal_argument_exception",
      "reason" : "Mapper for [text] conflicts with existing mapping in other types:\n[mapper [text] has different [analyzer], mapper [text] is used by multiple types. Set update_all_types to true to update [search_analyzer] across all types., mapper [text] is used by multiple types. Set update_all_types to true to update [search_quote_analyzer] across all types.]"
    }
  },
  "status" : 400
}
```

Closes #12839

Change implementation

Rather than make a new exception this improves the error message of the old
exception.
2015-10-19 10:42:55 -04:00
Nik Everett a963385dee Merge pull request #14134 from nik9000/bundle_shard_routing
Bundle TestShardRouting in test jar
2015-10-19 10:00:22 -04:00
javanna a6e7a5f307 Java api: remove the count api
Closes #14166
Closes #13928
2015-10-19 14:40:52 +02:00
Britta Weber 15a63f3ec7 Merge pull request #14089 from brwe/fix-test-access-denied
fix access denied for shard deletion with WindowsFS
2015-10-19 14:25:26 +02:00
Simon Willnauer c5cf5cde8f add several code comments and apply review comments 2015-10-19 13:32:49 +02:00
Simon Willnauer 9487a8e1fd apply review comments 2015-10-19 13:32:49 +02:00
Simon Willnauer b40c1deebe Remove MetaDataSerivce and it's semaphores
MetaDataSerivce tried to protect concurrent index creation/deletion
from resulting in inconsistent indices. This was originally added a
long time ago via #1296 which seems to be caused by several problems
that we fixed already in 2.0 or even in late 1.x version. Indices where
recreated without being deleted and shards where deleted while being used
which is now prevented on several levels. We can safely remove the semaphores
since we are already serializing the events on the cluster state threads.
This commit also fixes some expception handling bugs exposed by the added test
2015-10-19 13:32:49 +02:00
Simon Willnauer 06b1d956f8 Merge pull request #13801 from achow/achow/omit-old-current-stats
Omit current* stats for OldShardStats (closes #13386)
2015-10-19 11:48:02 +02:00
Luca Cavanna 6be72d220f Merge pull request #14007 from synhershko/patch-6
Fix ensureNodesAreAvailable's error message
2015-10-19 10:42:11 +02:00
Boaz Leskes fbe9c49e8f Internal: only have one CORS allow origin setting string
We currently have two, which is confusing when you  read the code (especially if one is used with a null default and the other with '*')

Note: this is not a real bug, just a  clean up. We do the right thing...

Closes #13988
2015-10-18 21:37:50 +02:00
Boaz Leskes de7d3cf752 Gateway: a race condition can prevent the initial cluster state from being recovered
After a full cluster restart, the elected master is tasked with recovery the last known cluster state from disk. To do so, the GatewayService registers it self as a listener to cluster state changes, triggering the recovery if the local node is elected. Sadly the initial post-election cluster state can be missed if it's being processed while the listener is registered (i.e., the listener is too late but the discoveryService.initialStateReceived is not yet set). In this case the cluster state from disk will be recovered with the next change (typically node join).

 In practice this is not a big deal as master election takes at least 3s (by which time the gateway is long started), but it does make some of our tests to fail: http://build-us-00.elastic.co/job/es_core_master_centos/7915/

 To fix this, we submit a cluster state task after the edition of the listener, so we are guaranteed to check things while they are at rest.

 While at it, I removed some left over latch which we don't really wait on anymore.

 Closes #13997
2015-10-18 21:15:07 +02:00
Simon Willnauer c71da4b999 Also catch EngineClosedException when pulling translog from potentially closed engine
When we check the engine if a flush is needed we don't catch EngineClosedException today
but the engine is potentially closed already in which case we can simply return false and don't need
to bubble up the exception.
2015-10-17 20:32:03 +02:00
Jason Tedor 7f12806a7d Fix typo in o.e.c.r.a.d.ConcurrentRebalanceAllocationDecider 2015-10-16 10:06:33 -04:00
javanna a1c1a8b230 Query DSL: don't change state of the bool query while converting to lucene query
We used to change the minimumShouldMatch field of the query depending on the context, the final minimim should match should still be applied based on that, but the original minimumShouldMatch of the query shouldn't change. This was revelead by some recent test failure.

Closes #14153
2015-10-16 14:33:09 +02:00
Adrien Grand 5ae810991c Upgrade to lucene-5.4-snapshot-1708254. 2015-10-16 09:41:36 +02:00
Simon Willnauer cd0084915d Allow parser to move on the START_OBJECT token when parsing search source
Currently we require parser to be right before the sources START_OBJECT
but if we are parsing embedded search sources this won't work since we potentially
moved already on to the START_OBJECT. This commit make this optional such that
both ways work.
2015-10-15 22:28:05 +02:00
Nik Everett 68d708a75f Merge pull request #11398 from Collaborne/bugs/explain-function-script-quotes
Fix the quotes in the explain message for a script score function without parameters
2015-10-15 13:56:21 -04:00
Nik Everett 846c01f42a [test] Bundle TestShardRouting in test jar
Plugins want to use this too.

Closes #14133
2015-10-15 11:54:14 -04:00
Colin Goodheart-Smithe cf3e92ae92 Merge branch 'master' into feature/search-request-refactoring 2015-10-15 13:51:00 +01:00
Colin Goodheart-Smithe ef5fc721e5 reverted non-null searchSourceBuilder in searchRequest for now 2015-10-15 13:49:43 +01:00
Robert Muir c3751801c6 Test that the lucene "unmap hack" is supported.
Closes #14120

Squashed commit of the following:

commit 556b7f5783211bd82a5d9796996e21be87b0404b
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Oct 14 15:16:54 2015 -0400

    Add bugid link

commit b44aac7e9f1a97974938c17e013812ebf4c2fa76
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Oct 14 15:01:41 2015 -0400

    Test that the lucene "unmap hack" is supported.

    We should know if this is not working for any configuration, otherwise resources such as address space, file handles, and even disk space become tied to Java's garbage collector.
2015-10-15 08:47:05 -04:00
Robert Muir 0dcac1448d Merge pull request #14126 from rmuir/seccomp_testbug
Fix SeccompTests bug on older kernels / add defense
2015-10-15 08:37:53 -04:00
javanna 0cab4a25fb Revert changes made to IndexQueryParserService, fixed upstream meanwhile 2015-10-15 14:35:16 +02:00
javanna 8a87448758 Revert changes made to IdsQueryBuilder, fixed upstream meanwhile 2015-10-15 14:28:39 +02:00
Colin Goodheart-Smithe 63c51b78b2 review comment fixes 2015-10-15 11:34:31 +01:00
Alexander Reelsen bbaf7ea0f0 Release 1.7.3: Added bwc indices and updated Version.java 2015-10-15 12:26:18 +02:00
Colin Goodheart-Smithe c618f75b76 Merge branch 'master' into feature/search-request-refactoring
# Conflicts:
#	core/src/main/java/org/elasticsearch/search/SearchService.java
2015-10-15 11:02:34 +01:00
Simon Willnauer 5b1ee8bd74 Fix GeoCenteriod Aggregation serialization 2015-10-15 09:57:47 +02:00
Robert Muir 9c109cae0d Fix SeccompTests bug on older kernels
This test failed only on a feature branch, because that feature branch has
a different build randomization script and is the only place
randomizing tests.security.manager (this test cannot run with it enabled).

On old kernels without TSYNC support, the test fails because (surprise to me) the thread that
runs the test is not the same thread that runs static initializers:
7571489190/randomized-runner/src/main/java/com/carrotsearch/randomizedtesting/RandomizedRunner.java (L573-L574)

To fix this test (its not an issue in practice, since we do this before creating threadpools),
we just record for testing purposes that we couldn't TSYNC, and re-run the whole thing for the test thread
in setUp(), failing if something goes wrong.

Also add a bunch of additional paranoia and narrow our defensive checks better here after reading
through more chrome bug reports: they don't impact us but those linux distros are too cowboy
with the backports and the spirit of the checks makes me feel better.
2015-10-15 01:40:32 -04:00
Jason Tedor 68561ce55c Merge pull request #14119 from jasontedor/index-meta-data-clean-up
Cleanup IndexMetaData
2015-10-14 19:29:08 -04:00
Nicholas Knize ceefe2e91a remove centroid calculation from GeoHashGridAggregation 2015-10-14 16:19:28 -05:00
Nicholas Knize b31d3ddd3e Adds geo_centroid metric aggregator
This commit adds a new metric aggregator for computing the geo_centroid over a set of geo_point fields. This can be combined with other aggregators (e.g., geohash_grid, significant_terms) for computing the geospatial centroid based on the document sets from other aggregation results.
2015-10-14 16:19:09 -05:00
Jason Tedor 88dd3256fb Cleanup IndexMetaData
This commit cleans up IndexMetaData. In particular, all duplicate
getters (X and getX) have been collapsed into one (getX). Further, the
number of shards and number of replicas settings are now parsed once
and saved off as fields.
2015-10-14 14:59:35 -04:00
Robert Muir 5d001d1578 Decentralize plugin security
* Add ability for plugins to declare additional permissions with a custom plugin-security.policy file and corresponding AccessController logic. See the plugin author's guide for more information.
* Add warning messages to users for extra plugin permissions in bin/plugin.
* When bin/plugin is run interactively (stdin is a controlling terminal and -b/--batch not supplied), require user confirmation.
* Improve unit test and IDE support for plugins with additional permissions by exposing plugin's metadata as a maven test resource.

Closes #14108

Squashed commit of the following:

commit cf8ace65a7397aaccd356bf55f95d6fbb8bb571c
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Oct 14 13:36:05 2015 -0400

    fix new unit test from master merge

commit 9be3c5aa38f2d9ae50f3d54924a30ad9cddeeb65
Merge: 2f168b8 7368231
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Oct 14 12:58:31 2015 -0400

    Merge branch 'master' into off_my_back

commit 2f168b8038e32672f01ad0279fb5db77ba902ae8
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Oct 14 12:56:04 2015 -0400

    improve plugin author documentation

commit 6e6c2bfda68a418d92733ac22a58eec35508b2d0
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Oct 14 12:52:14 2015 -0400

    move security confirmation after 'plugin already installed' check, to prevent user from answering unnecessary questions.

commit 08233a2972554afef2a6a7521990283102e20d92
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Oct 14 05:36:42 2015 -0400

    Add documentation and pluginmanager support

commit 05dad86c51488ba43ccbd749f0164f3fbd3aee62
Author: Robert Muir <rmuir@apache.org>
Date:   Wed Oct 14 02:22:24 2015 -0400

    Decentralize plugin permissions (modulo docs and pluginmanager work)
2015-10-14 14:46:45 -04:00
javanna 736823163f Plugins: plugin script to set proper plugin bin dir attributes
This commit makes sure that the plugin script looks at user, group and permissions of the elasticsearch bin dir and copies them over to the plugin bin subdirectory, whatever they are, so that they get properly setup depending on how elasticsearch was installed. We also make sure that execute permissions are added for files (we already did this before).

Relates to #11016
Closes #14088
2015-10-14 14:59:38 +02:00
Britta Weber f07853b56c use lambdas 2015-10-14 11:36:02 +02:00
Britta Weber 4f536945de remove unneeded Exception and handling thereof 2015-10-14 11:32:57 +02:00
Simon Willnauer c133bec4bd Ensure searcher is release if wrapping fails
Today we leak an index searcher if we fail to wrap the seacher in
IndexShard. This commit ensures that the seacher is released if the wrapper
throws an exception.

This commit also restructures some test to be more atomic and only test a single
feature / attribute of the wrapper.
2015-10-14 10:44:57 +02:00
Simon Willnauer 5828796848 Merge pull request #14084 from s1monw/close_the_wrapper_only
Streamline top level reader close listeners and forbid general usage
2015-10-14 09:39:30 +02:00
Simon Willnauer db710c576f add javadocs 2015-10-14 09:28:05 +02:00