Commit Graph

11789 Commits

Author SHA1 Message Date
Simon Willnauer fafd67e1ae [TEST] Mute local tests with Java9EA
Relates to #10984
2015-05-05 16:50:57 +02:00
Britta Weber 14e5880fea [TEST] don't fail if meta state cannot be loaded
Loading of meta state fails rarely if the state is deleted while we try to load it.
We should try again in this case instead of failing the test.
2015-05-05 15:20:57 +02:00
Simon Willnauer 00d663f594 [TRANSLOG] Make translog file parsing more picky 2015-05-05 14:11:32 +02:00
Britta Weber 3cda9b2bd7 Write state also on data nodes if not master eligible
When a node was a data node only then the index state was not written.
In case this node connected to a master that did not have the index
in the cluster state, for example because a master was restarted and
the data folder was lost, then the indices were not imported as dangling
but instead deleted.
This commit makes sure that index state for data nodes is also written
if they have at least one shard of this index allocated.

closes #8823
closes #9952
2015-05-05 12:15:40 +02:00
Simon Willnauer fe5a35b68e Merge branch 'master' into pr-10624
Conflicts:
	src/main/java/org/elasticsearch/index/shard/IndexShard.java
2015-05-05 11:46:02 +02:00
Simon Willnauer 767309265b [ENGINE] Make translog fully private to the engine
This commit moves the translog creation into the InternalEngine
to ensure the transactino log is created after we acquired the write
lock on the index. This also prevents races when ShadowEngines are shutting
down due to node restarts where another node already takes over the not yet
fully synced transaction log.
2015-05-05 11:36:51 +02:00
Clinton Gormley e28ad853c7 Docs: Fixed bad asciidoc in migrate_2_0 2015-05-05 11:17:21 +02:00
Colin Goodheart-Smithe 123b0723fe Aggregations: Fixes Infinite values return from geo_bounds with non-zero bucket-ordinals
If the collect method was called with a bucketOrd of > 0 the arrays holding the state for the aggregation would be grown but the initial values for the bucketOrds > 0 were all set to Double.NEGATIVE_INFINITY meaning that for the bottom, posLeft and negLeft values no collected document would change the value since NEGATIVE_INFINITY is always less than every other value.

Closes #10804
2015-05-05 09:58:31 +01:00
Pascal Borreli af6d890ad5 Docs: Fixed typos
Closes #10973
2015-05-05 10:38:05 +02:00
Simon Willnauer 1bc159ebf7 mute test in favor of #10972 2015-05-05 10:04:52 +02:00
Robert Muir d62771ac5d Merge pull request #10965 from rmuir/lockdown4
make testing better mimic reality for securitymanager
2015-05-04 17:06:24 -07:00
Ryan Ernst b889b3b437 Use java sys prop override in tests instead of flag to createPermissions 2015-05-04 15:28:08 -07:00
Shay Banon 187d79b6df Centralize admin implementations and action execution
This change removes the multiple implementations of different admin interfaces and centralizes it with AbstractClient. It also makes sure *all* executions of actions now go through a single AbstractClient#execute method, taking care of copying headers and wrapping listener.
This also has the side benefit of removing all the code around differnet possible clients, and removes quite a bit of code (most of the + code is actually removal of generics and such).

This change also changes how TransportClient is constructed, requiring a Builder to create it, its a breaking change and its noted in the migration guide.

Yea another step towards simplifying the action infra and making it simpler...
2015-05-04 23:40:17 +02:00
Robert Muir 072b90296a Use the special java.ext.dirs path instead of 4 tomcat heuristics 2015-05-04 17:16:08 -04:00
Igor Motov bd453db411 Docs: clarify cluster state handling 2015-05-04 17:00:36 -04:00
Robert Muir 8e8b95faeb fix wrong comment change 2015-05-04 16:30:42 -04:00
Robert Muir 2ed2c4f884 fix permissions bugs 2015-05-04 16:27:24 -04:00
Lee Hinman eabeae980b Merge remote-tracking branch 'dakrone/sharedfs-recovery-any-node' 2015-05-04 14:15:30 -06:00
Lee Hinman 18ab718693 Allow shards on shared filesystems to be recovered on any node
Currently, when all copies of a shard are lost, we reach out to all
other nodes to see whether they have a copy of the data. For a shared
filesystem, though, we can assume that each node has a copy of the data
available, so return a state version of at least 0 for each node.

This feature is set using the dynamic index setting
`index.shared_filesystem.recover_on_any_node`, which defaults to
`false`.

Fixes #10932
2015-05-04 14:03:31 -06:00
Simon Willnauer 7e5c238998 Only mark translog committed in restore recovery 2015-05-04 21:39:17 +02:00
Robert Muir fe046df125 hacky state 2015-05-04 15:38:46 -04:00
Robert Muir a0be20137d Merge pull request #10963 from rmuir/lockdown3
Remove exitVM permissions
2015-05-04 11:56:30 -07:00
Robert Muir 06482e8424 Use Releasables.close here 2015-05-04 14:55:10 -04:00
Robert Muir 2be1a09c77 add a null check for safety 2015-05-04 14:21:11 -04:00
Robert Muir a048f8944b Remove exitVM permission 2015-05-04 14:06:32 -04:00
Zachary Tong babfd8a181 [TEST] Stabilize MovAvgTests with more lenient floating point checks
It appears the previous failure (-Dtests.seed=D9EF60095522804F) is just accumulation of
floating point error differences between expected and actual results.  Making the tests less
stringent by requiring closeTo(0.1) instead of the previous 0.00001
2015-05-04 13:33:20 -04:00
Zachary Tong f6d5167d41 Merge pull request #10929 from polyfractal/docs/aggs
Restructure Aggregation documentation
2015-05-04 13:28:47 -04:00
Robert Muir 54d361259e Merge pull request #10962 from rmuir/lockdown2
Remove JNI permissions, improve JNI testing.
2015-05-04 10:22:46 -07:00
Robert Muir b8efa8ea21 Remove JNI permissions, improve JNI testing. 2015-05-04 12:30:03 -04:00
Britta Weber 7bf83ff924 ref count write operations on IndexShard
This commit adds a counter for IndexShard that keeps track of how many write operations
are currently in flight on a shard. The counter is incremented whenever a write request is
submitted in TransportShardReplicationOperationAction and decremented when it is finished.
On a primary it stays incremented while replicas are being processed.
The counter is an instance of AbstractRefCounted. Once this counter reaches 0
each write operation will be rejected with an IndexClosedException.

closes #10610
2015-05-04 18:03:29 +02:00
Ryan Ernst ba68d354c4 Merge pull request #10934 from mattweber/custom_analyzer_pos_offset_gap
document and test custom analyzer position offset gap
2015-05-04 08:56:50 -07:00
Matt Weber 63c4a214db document and test custom analyzer position offset gap 2015-05-04 08:53:45 -07:00
Clément Salaün c0659ce4d4 Docs: Update geo-distance-range-filter.asciidoc
missing comma

Closes #10957
2015-05-04 17:17:48 +02:00
Simon Willnauer 930eacd457 Merge branch 'master' into pr-10624 2015-05-04 17:06:05 +02:00
Simon Willnauer 29e5f76920 [INDICES] Wait forever (or one day) for indices to close
Today we wait 30 sec for shards to flush and close and then simply exit the process.
This is often not desired and we should by default wait long enough for shards to
close etc. This commit adds a default timeout of one day which simplifies the code
and gives us _enough_ time to shut down.

Closes #10680
2015-05-04 16:56:03 +02:00
Clinton Gormley bffcf5af58 Docs: Update rolling upgrade
Added note about why replica shards may remain unassigned while there is only one node of the higher version in the cluster.

Closes #10951
2015-05-04 16:52:35 +02:00
Robert Muir 75cadaff39 Merge pull request #10953 from rmuir/lockdown
remove shutdownHooks permission
2015-05-04 07:38:43 -07:00
Simon Willnauer 10ee8f7793 [ENGINE] Mark current translog as committed if initial recovery is skipped
If the initial recovery is skipped all uncommitted changes are lost. This
must be enforced otherwise primary and replica will go out of sync once the
primary is started after restore and a replica recovers from it applying the
still referenced transaction logs.
2015-05-04 16:26:24 +02:00
Simon Willnauer b5a5bc4f89 [CORE] Allow rebalancing primary shards on shared filesystems
Instead of failing the Engine for a shared filesystem, this change
allows a "soft close" of the Engine, where only the IndexWriter is
closed so that the replica can open an IndexWriter using the same
filesystem directory/mount.

Fixes #10469
2015-05-04 16:26:18 +02:00
Robert Muir 5a701c1f9f remove shutdownHooks permission 2015-05-04 10:18:09 -04:00
Robert Muir 02da246b10 Merge pull request #10923 from elastic/die_cwd_die
Remove CWD access in tests and don't implicitly use CWD/user.dir for configuration.
2015-05-04 07:11:38 -07:00
Robert Muir 4b3672b7df Add migration note for hunspell dictionaries 2015-05-04 10:00:05 -04:00
Robert Muir 01d6f0dc1d Merge branch 'master' into die_cwd_die
Conflicts:
	src/test/java/org/elasticsearch/client/AbstractClientHeadersTests.java
2015-05-04 09:55:29 -04:00
Zachary Tong 967e05ea76 [DOCS] Fix section levels for Sampler agg 2015-05-04 09:18:24 -04:00
Simon Willnauer 24e73a2c83 [TRANSLOG] Remove channel refcounting for assertions
This refcounting doesn't work for shadow replicas since we open
the same translog file from more than one node while running a rolling
restart. This functionality is also superseeded by our filesystem abstraction
which detects file leaks under the hood.
2015-05-04 14:20:39 +02:00
Robert Muir f042b8f2e1 Merge pull request #10936 from rmuir/eight_point_three
simplify securitymanager init
2015-05-04 04:53:18 -07:00
Mikael Mattsson 70ae862fe4 Docs: Add Elasticsearch Indexer for WordPress to integrations.asciidoc
Closes #10921
2015-05-04 13:16:55 +02:00
Simon Willnauer bbffca193c Fail engine if metadata is corrupted on recovery start 2015-05-04 12:18:22 +02:00
Simon Willnauer 7e5f9d5628 Merge branch 'master' into pr-10624
Conflicts:
	src/main/java/org/elasticsearch/index/engine/EngineConfig.java
	src/main/java/org/elasticsearch/index/shard/IndexShard.java
	src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java
	src/test/java/org/elasticsearch/index/engine/ShadowEngineTests.java
2015-05-04 11:37:54 +02:00
Shay Banon b87d360e79 Automatically thread client based action listeners
Today, we rely on the user to set request listener threads to true when they are on the client side in order not to block the IO threads on heavy operations. This proves to be very trappy for users, and end up creating problems that are very hard to debug.
Instead, we can do the right thing, and automatically thread listeners that are used from the client when the client is a node client or a transport client.
This change also removes the ability to set request level listener threading, in the effort of simplifying the code path and reasoning around when something is threaded and when it is not.
closes #10940
2015-05-04 11:05:42 +02:00