Commit Graph

15899 Commits

Author SHA1 Message Date
Christoph Büscher dbaa90a3f8 Merge branch 'master' into feature/query-refactoring 2015-09-15 11:47:42 +02:00
Lee Hinman de2fcd4be4 [TEST] Use greaterThanOrEqualTo for testClusterInfoServiceCollectsInformation 2015-09-14 21:10:13 -06:00
Christoph Büscher 01ea42619a Tests: re-enable SearchQueryIT#testIndicesQuerySkipParsing and fixing exception message 2015-09-14 22:41:37 +02:00
Nik Everett 713009df37 Merge branch 'Output plugin info only in verbose mode'
https://github.com/elastic/elasticsearch/pull/12908

Moved output to verbose level and additionally changed the plugin info output format

Before:

```shell
PluginInfo{name='cloud-aws', description='The Amazon Web Service (AWS) Cloud plugin allows to use AWS API for the unicast discovery mechanism and add S3 repositories.', site=false, jvm=true, classname=org.elasticsearch.plugin.cloud.aws.CloudAwsPlugin, isolated=true, version='2.1.0-SNAPSHOT'}
```

After:

```shell
- Plugin information:
Name: cloud-aws
Description: The Amazon Web Service (AWS) Cloud plugin allows to use AWS API for the unicast discovery mechanism and add S3 repositories.
Site: false
Version: 2.1.0-SNAPSHOT
JVM: true
* Classname: org.elasticsearch.plugin.cloud.aws.CloudAwsPlugin
* Isolated: true
```

Fixes #12907
2015-09-14 15:36:20 -04:00
Britta Weber 6ea6876839 [test] wait until master actually has applied cluster state that contains second node
If we don't wait we might retrieve the cluster state before second node
was added when we try to add the delegate in which the discovery node for
node_2 is null.
2015-09-14 18:56:40 +02:00
Nik Everett 3fa3b1597f [test] PluginManager plugin info printing
Also removes @Test in keeping with Elasticsearch's slow migration away from
the annotation in favor of test methods named testSomeThing.
2015-09-14 11:32:33 -04:00
Britta Weber 20f757c187 Merge pull request #13481 from brwe/single-node-blocks
[test] make sure ESSingleNodeTestCase waits after starting node until…
2015-09-14 17:09:25 +02:00
Britta Weber ba4712fb38 [test] make sure ESSingleNodeTestCase waits after starting node until all blocks removed
When a single node starts up it will first elect itself as master and then tries to
recover the cluster state or, if there is none,  initialize an empty one and publish it.
Until it has done that, the cluster state will contain a global block and
requests might fail with
SERVICE_UNAVAILABLE/1/state not recovered / initialized
We need to wait for green.
2015-09-14 17:06:34 +02:00
Lee Hinman 004f23500e [TEST] Add AwaitsFix for https://github.com/elastic/elasticsearch/issues/13558 2015-09-14 08:40:36 -06:00
Britta Weber 997616a42b [test] test that shards are deleted if the first attempt after relocation failed and index deleted next 2015-09-14 16:09:15 +02:00
Alexander Reelsen 5f6aeb982d Release script: Improve automation for package repositories
* Automatic package repository creation for debian and rpm repositories using deb-s3 and rpm-s3 tools
* Fixing paths in email for repositories
* Add manual verification step for maven staging repo
* Do not create release directory in /tmp, because we might loose it on VMs
* Removed unused download-s3 script
* Add signage check for RPM
* Removed download-s3.py/upload-s3.py, as they are unused

Closes #13209
2015-09-14 15:03:30 +02:00
Christoph Büscher 90f24c1a79 Merge branch 'master' into feature/query-refactoring
Conflicts:
	core/src/main/java/org/elasticsearch/index/query/GeoDistanceRangeQueryParser.java
	core/src/main/java/org/elasticsearch/index/query/GeoPolygonQueryBuilder.java
	core/src/main/java/org/elasticsearch/index/query/GeohashCellQuery.java
	core/src/main/java/org/elasticsearch/index/query/WrapperQueryBuilder.java
	core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchIT.java
2015-09-14 14:31:01 +02:00
Nik Everett 9c91af9b7f Merge pull request #13422 from nik9000/java_8_for_package_tests
Packaging tests use Java 8
2015-09-14 08:26:04 -04:00
Simon Willnauer bd025080c4 Don't use forbidden API in FailableCache 2015-09-14 14:00:50 +02:00
Jason Tedor 57c5efacf6 Fix test bug in o.e.a.s.b.n.TransportBroadcastByNodeActionTests
This commit fixes a test bug in
o.e.a.s.b.n.TransportBroadcastByNodeActionTests. Namely, the randomized
test allowed for the creation of cluster states that allocated indices
having zero shards. This ultimately surfaced in a
NoSuchElementException when attempting to iterate over the nonexistent
shards. The fix is merely to draw the random number of shards from 1 to
10 instead of 0 to 10.
2015-09-14 07:54:05 -04:00
Simon Willnauer 30bd46ab25 Replace LoadingCache usage with a simple ConcurrentHashMap
This commit replaces the usage of LoadedCache with a simple CHM and calls
to computeIfAbsent and adds LoadingCache and CacheLoader to forbidden APIs

Relates to #13224
2015-09-14 13:25:58 +02:00
Alexander Reelsen a96350d785 Release: Add 1.7.2 bwc indices/versions
* Added BWC indices
* Added snapshot version to Version.java
* Fixed create_bwc_index to use localhost instead of localhost and 127.0.0.1 (problem with ipv4/6 setup)
2015-09-14 12:58:46 +02:00
Christoph Büscher adaa998225 Query Refactoring: adding illegal argument checks to MatchQueryBuilder 2015-09-14 11:12:56 +02:00
Simon Willnauer 40959068d5 Remove and forbid use of guava Function, Charsets, Collections2
This commit removes and now forbids all uses of
Function, Charsets, Collections2  across the codebase. This
is one of many steps in the eventual removal of Guava as a dependency.

Relates #13224
2015-09-14 10:27:12 +02:00
Robert Muir d0deb28336 Merge pull request #13550 from rmuir/this_test_is_fucked_up
NewPathForShardTests is broken every which way from Sunday.
2015-09-14 04:13:55 -04:00
Boaz Leskes 15f4863ef6 Discovery: Add two phased commit to Cluster State publishing
When publishing a new cluster state, the master will send it to all the node of the cluster, noting down how many *master* nodes responded successfully. The nodes do not yet process the new cluster state, but rather park it in memory. As soon as at least minimum master nodes have ack-ed the cluster state change, it is committed and a commit request is sent to all the node that responded so far (and will respond in the future). Once receiving the commit requests the nodes continue to process the cluster state change as they did before this change.

A few notable comments:
1. For this change to have effect, min master nodes must be configured.
2. All basic cluster state validation is done in the first phase of publish and is thus now part of `ShardOperationResult`
3. A new `COMMIT_TIMEOUT` settings is introduced, dictating how long a master should wait for nodes to ack the first phase. Unlike `PUBLISH_TIMEOUT`, if waiting for a commit times out, the cluster state change will be rejected.
4. Failing to achieve a min master node of acks, will cause the master to step down as it clearly doesn't have enough active followers.
5. Previously there was a short window between the moment a master lost it's followers and it stepping down because of node fault detection failures. In this short window, the master could process any change (but fail to publish it). This PR closes this gap to 0.
6. A dedicated pending cluster states queue was added to keep pending non-comitted cluster states and manage the logic around processing committed cluster states. See #13303 for details.

Closes #13062 , Closes #13303
2015-09-14 09:55:41 +02:00
Simon Willnauer 562126a332 Clenup InternalClusterInfoService
This commit allows to refresh the info service in a blocking fashion
which allows tests to prevent installing listeners alltogether and
makes the class easier to test. Installing a listnener is always subject
to concurrent modifications where the listener might be called mulitple times
or with stale information which causes tests to fail.
2015-09-14 09:37:19 +02:00
Simon Willnauer 95c83ba2b8 Fix compilation error 2015-09-14 09:29:41 +02:00
Simon Willnauer a77ee6e5dd Merge pull request #13545 from s1monw/use_supplier_instead_of_reflection
Use Supplier instead of Reflection
2015-09-14 09:21:15 +02:00
Simon Willnauer a0c10850d9 Use Supplier instead of Reflection
Java 8 allows for method references which in-turn will cause
compile errors if a method is not visible while reflection fails late
and maybe too late. We can now register Request instances via FooRequest::new
instead of passing FooRequest.class and call it's ctor via reflection.
2015-09-14 09:11:32 +02:00
Boaz Leskes 564e1eca42 merge from master 2015-09-14 09:03:45 +02:00
Tanguy Leroux 561f5b590f Fix AwarenessAllocationIT.testAwarenessZones test
This test sometimes fails because the first node is elected as master and waits 30s for incoming joins but in the meanwhile the 3 other nodes form a cluster on their side. The index will be created and its shards allocated on these 3 nodes, then the test checks for the number of shards on each node (it should be 2 or 3) but because the first node has not fully join the cluster yet one node will have 5 shards.

 closes #13305
2015-09-14 08:57:31 +02:00
Robert Muir 4a9b8a94c9 NewPathForShardTests is broken every which way from Sunday.
1. FileSystem wrapping code is broken, thats why you get providermismatch exception!
   Instead of fixing this, it SuppressesForbidden!!!!
2. Because it uses SuppressForbidden on the test, the whole thing is lenient, it uses java.io.File for example!
3. Of course it fails consistently on windows because it can't remove files, because it leaks file handles (locks)
   like a sieve since it does not close node environment. With correct wrapping this is always detected by e.g.
   our leak detection FS. Instead of fixing the leak, it assumesFalse(WINDOWS) !!!!!

I do not know how this snuck past me, but I need this fixed to remove setAccessible.
2015-09-14 01:30:09 -04:00
Jason Tedor b4adad7c0a Code cleanup in TransportBroadcastByNodeAction 2015-09-13 21:35:24 -04:00
Boaz Leskes a758eec78a Recovery: failed to properly ack translog ops during wait on mapping changes
During the second phase of recovery, replayed transaction log entries may need to wait on mapping changes that have not yet propagated to the target node. Currently we correctly replay the operation at a later stage, but we acknowledge the replay request before actually performing the work.

Example failure: http://build-us-00.elastic.co/job/es_feature_two_phase_pub/859/

Closes #13535
2015-09-13 21:14:40 +02:00
Simon Willnauer 5098dcaf96 [TEST] Don't rely on currentTimeMillis in RoutingServiceTests
If the machine is very slow this test fails if the delta of the unallocaiton
timestamp and the last scheduled delay is greater than the scheduled delay time.
2015-09-13 16:58:56 +02:00
Britta Weber 5a35a8582b [test] mute and add link to issue
see #13542
2015-09-13 15:06:28 +02:00
Robert Muir 7789dfa0c9 Merge pull request #13539 from rmuir/setaccessible_long_tail
Remove all setAccessible in tests and forbid
2015-09-13 00:39:30 -04:00
Robert Muir 7703aab95a support mocking these components in tests without setAccessible 2015-09-12 20:49:20 -04:00
Robert Muir b16e1569fe Remove all setAccessible in tests and forbid 2015-09-12 19:46:39 -04:00
Robert Muir 3a0dd59a15 Merge pull request #13537 from rmuir/die_setaccessible_in_tests_die
Remove easy uses of setAccessible in tests.
2015-09-12 17:19:38 -04:00
Robert Muir 6a15518e8c don't list this class twice (vi typo) 2015-09-12 17:07:18 -04:00
Robert Muir 39ecda1dad Merge pull request #13538 from rmuir/puff_on_this_aws
Hack around aws security hole of accessing sun.security.ssl, s3 repository works on java 9 again
2015-09-12 17:03:27 -04:00
Robert Muir 174ca77ebf Hack around aws security hole of accessing sun.security.ssl, s3 repository works on java 9 again
Today this is really horrible, and we have a PR sent to fix it, but nobody
does anything: https://github.com/aws/aws-sdk-java/pull/432

With java 9, we cannot even grant the permission, this kind of sheistiness is not allowed,
and s3 repository is completely broken.

The problem is their code is still broken, and won't handle neither SecurityException (our PR)
nor the new InaccessibleObjectException they will get from java 9.

We use a really hacky hack to deliver an exception that their code catches (IllegalAccessException) instead.

This means s3 repository is working on java 9, and we close off access to sun.security.ssl completely
2015-09-12 14:16:16 -04:00
Robert Muir 0b16552367 Revert "Disable this test (we should fix rest framework to disable based on java versions)"
This reverts commit 6a0381b582.
2015-09-12 12:05:47 -04:00
Robert Muir a7418cd9bb Remove easy uses of setAccessible in tests.
Don't worry, I will fix the rest. But some of those remaining will need a lucene upgrade,
we need to add a getter or two for tests to do things cleanly.
2015-09-12 11:57:30 -04:00
Simon Willnauer f2b4ba9a7c [TEST] BooleanQuery iteration order is not consistent 2015-09-12 11:18:44 +02:00
Robert Muir e1efd5f6ba Merge pull request #13531 from rmuir/die_setaccessible_die
Ban setAccessible from core code, restore monitoring stats under java 9
2015-09-12 03:31:40 -04:00
Robert Muir d6f56030d8 ban setAccessible from core code.
In addition to being a big security problem, setAccessible is a risk
for java 9 migration. We need to clean up our code so we can ban it
and eventually enforce this with security manager for third-party code, too,
or we may have problems.

Instead of using setAccessible, use the correct modifier (e.g. public).

TODO: ban in tests
TODO: ban in security manager at runtime
2015-09-12 02:11:06 -04:00
Robert Muir 3ec5cf6263 get our stats back by reflecting mxbeans correctly 2015-09-11 22:28:37 -04:00
Robert Muir 8be7fde181 Revert "Update monitor probe tests for java 9: this stuff is no longer accessible"
This reverts commit af2df9aef6.
2015-09-11 22:21:02 -04:00
Jason Tedor 1f04182b81 Merge pull request #13525 from jasontedor/immutable-sorted-map-be-gone
Remove and forbid use of com.google.common.collect.ImmutableSortedMap
2015-09-11 17:42:40 -04:00
Jason Tedor d6d8d30d47 Remove and forbid use of com.google.common.collect.ImmutableSortedMap
This commit removes and now forbids all uses of
com.google.common.collect.ImmutableSortedMap across the codebase. This
is one of many steps in the eventual removal of Guava as a dependency.

Relates #13224
2015-09-11 17:42:19 -04:00
Igor Motov 39ca45050a Simplify the BlobContainer blob writing interface
Instead of asking blob store to create output for posting blob content, this change provides that content of the blob to the blob store for writing. This will significantly simplify the  interface for S3 and Azure plugins.
2015-09-11 16:39:58 -04:00
Simon Willnauer 7b0f086946 Remove and forbid use of several com.google.common.util. classes
This commit replaces:
 * com.google.common.util.concurrent.ListenableFuture
 * com.google.common.util.concurrent.SettableFuture
 * com.google.common.util.concurrent.Futures
 * com.google.common.util.concurrent.MoreExecutors

And forbits its usage via forbidden APIs. This is one of
many steps in the eventual removal of Guava as a dependency.

Relates to #13224
2015-09-11 21:15:12 +02:00