Commit Graph

11933 Commits

Author SHA1 Message Date
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
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
Simon Willnauer 23ac32e616 Remove old 0.90 shard allocator
the `even_shard` allocator has been replaced years ago in early 0.90.
We can remove it now in 2.0 since the new one is considered stable.
2015-05-04 10:48:18 +02:00
Simon Willnauer fe7d018f0c [TEST] make LuceneTest extraFS proof 2015-05-04 10:33:47 +02:00
Simon Willnauer 9e82d3e7b9 Merge pull request #5861 from elastic/trim-config
Settings: Trimmed the main `elasticsearch.yml` configuration file
2015-05-04 09:42:08 +02:00
Adrien Grand 3409994b9e Merge pull request #10897 from jpountz/fix/nocache
Core: Cut over to the Lucene filter cache.

Close #10897
2015-05-04 09:14:49 +02:00
Adrien Grand b72f27a410 Core: Cut over to the Lucene filter cache.
This removes Elasticsearch's filter cache and uses Lucene's instead. It has some
implications:
 - custom cache keys (`_cache_key`) are unsupported
 - decisions are made internally and can't be overridden by users ('_cache`)
 - not only filters can be cached but also all queries that do not need scores
 - parent/child queries can now be cached, however cached entries are only
   valid for the current top-level reader so in practice it will likely only
   be used on read-only indices
 - the cache deduplicates filters, which plays nicer with large keys (eg. `terms`)
 - better stats: we already had ram usage and evictions, but now also hit count,
   miss count, lookup count, number of cached doc id sets and current number of
   doc id sets in the cache
 - dynamically changing the filter cache size is not supported anymore

Internally, an important change is that it removes the NoCacheFilter infrastructure
in favour of making Query.rewrite specializing the query for the current reader so
that it will only be cached on this reader (look for IndexCacheableQuery).

Note that consuming filters with the query API (createWeight/scorer) instead of
the filter API (getDocIdSet) is important for parent/child queries because
otherwise a QueryWrapperFilter(ParentQuery) would run the wrapped query per
segment while relations might be cross segments.
2015-05-04 09:02:15 +02:00
Robert Muir 3a89b990ea remove another unnecessary permission 2015-05-03 23:37:05 -04:00
Robert Muir fc54ff5f10 remove now-unnecessary test permission 2015-05-02 15:19:01 -04:00
Robert Muir 86fc8ceac7 simplify security rules 2015-05-02 14:42:06 -04:00
Robert Muir 8c0d03c3ee add a hack for windows 2015-05-02 12:41:38 -04:00