Commit Graph

11967 Commits

Author SHA1 Message Date
Tanguy Leroux 3976724882 Add pid file to Environment
This commit adds the path of the PID file to the Environment. It also add it to the Security Manager since the PID file is deleted by a shutdown hook when the JVM is exited.
2015-05-05 18:39:19 +02:00
Zachary Tong 4f65130703 [TEST] Fix min/max accumulator in MovAvg tests
Double.MIN_VALUE does not follow the same semantics as Integer.MIN_VALUE.  Namely, it
represents the smallest positive, non-zero value a double can hold.  Since the test uses negative
doubles, this can incorrectly find the min/max metric for a set of values.

Instead, Double.NEGATIVE_INFINITY needs to be used, which represents the smallest value possible.

Not strictly necessary, but MAX_VALUE was switched to POSITIVE_INFINITY just to be 100% correct
2015-05-05 12:29:49 -04:00
Simon Willnauer d20202a963 Remove double exceptin handling that causes false replica failures
we already fail the shard in the `onFailure` method if the replica
operation barfs. This additional check has been added lately that
bypasses the clusterstate observer which causes replicas to fail
if the mappings are not yet present.
2015-05-05 18:04:27 +02:00
Robert Muir afdec4c84c Merge pull request #10989 from rmuir/jna_optional
ensure JNA is fully loaded when its avail, but don't fail its not
2015-05-05 09:03:16 -07:00
Robert Muir 15e6d3ec6c ensure JNA is fully loaded when its avail, but don't fail its not 2015-05-05 11:49:40 -04:00
Britta Weber dc2eed9681 fix after merge with master 2015-05-05 17:45:41 +02:00
Simon Willnauer 200174aa37 Remove Translog interface
We only have one implementation of this interface which makes not much
sense. This commit removes the abstraction.
2015-05-05 17:34:59 +02:00
Britta Weber e3d346d3b7 cleanup 2015-05-05 17:32:03 +02:00
Britta Weber 8349a3ee1e call sync flush when shard is marked as inactive 2015-05-05 17:19:09 +02:00
Robert Muir 9c0d379254 style cleanups (assume and suppressforbidden) 2015-05-05 10:59:39 -04:00
Simon Willnauer fafd67e1ae [TEST] Mute local tests with Java9EA
Relates to #10984
2015-05-05 16:50:57 +02:00
Britta Weber fbc26ca49b implement check for in flight now that we have the counter 2015-05-05 16:15:25 +02:00
Britta Weber 87af6491c9 Merge remote-tracking branch 'origin/master' into feature/synced_flush 2015-05-05 16:15:13 +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
Robert Muir 13636dcfef Let HTTPS work correctly 2015-05-05 09:14:51 -04: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
Colin Goodheart-Smithe 12e39a0d5a Scripting: allow script language to be null when parsing
Closes #10926
2015-05-05 11:11:40 +01: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 6ec6567bad bail if ES is run as root 2015-05-05 01:29:57 -04:00
Robert Muir a7774f2d8b Run groovy scripts with no permissions 2015-05-05 00:33:29 -04: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
aleph-zero 2b483cc806 Removed reference to search type 'count'
Removed reference to search type 'count' as this is now a deprecated
search type.
2015-05-04 14:48:40 -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