Commit Graph

19741 Commits

Author SHA1 Message Date
Yannick Welsch 8cca0395ef Revert "Make GeoDistanceSortBuilder serializable"
This reverts commit c108a4ce6d.
2016-02-02 14:04:45 +01:00
Yannick Welsch 089ab7d9bf Revert "Remove deprecation for geohash setter"
This reverts commit b5a4e99344.
2016-02-02 14:03:58 +01:00
Yannick Welsch 7ea2e99f91 Revert "Indentation fix for messy SimpleSortTest"
This reverts commit 26f77eb70d.
2016-02-02 14:03:40 +01:00
Yannick Welsch c5a6ddfdc2 Merge pull request #16274 from ywelsch/fix/endless-index-loop
Prevent TransportReplicationAction to route request based on stale local routing table
2016-02-02 13:59:54 +01:00
Yannick Welsch cd53772178 Use allocation ids to prevent repeated recovery of failed shards
Closes #16346
2016-02-02 13:54:27 +01:00
Yannick Welsch af1f637547 Prevent TransportReplicationAction to route request based on stale local routing table
Closes #16274
Closes #12573
Closes #12574
2016-02-02 13:52:45 +01:00
Prayag Verma 10b3071e16 Fix minor typo in migrate_3_0.asciidoc
Remove extra `on`
2016-02-02 18:16:58 +05:30
Isabel Drost-Fromm 26f77eb70d Indentation fix for messy SimpleSortTest 2016-02-02 13:46:25 +01:00
Clinton Gormley 70f9d60585 Merge pull request #16020 from mfussenegger/migrate-2_0_settings
2.0 Breaking Changes - Settings docs don't mention index.gateway.local.sync
2016-02-02 13:19:17 +01:00
Isabel Drost-Fromm b5a4e99344 Remove deprecation for geohash setter
This removes the deprecation for the geohash based setter to quickly fix the failure here: http://build-us-00.elastic.co/job/es_core_master_suse/3312 

Reintroducing postponed until related test in groovy module is fixed. Need to figure out what went wrong when I ran the build locally w/o failure before.
2016-02-02 13:09:34 +01:00
Yannick Welsch 51862ce5ae Fix IndexShardTests.testStressRelocated
Closes #16364
2016-02-02 12:57:19 +01:00
Boaz Leskes 58825773eb Remove `discovery.zen.rejoin_on_master_gone`
That setting was built as an escape hatch for the work done in 1.4. I never heard it being used once. We can safely remove it.

Closes #16353
2016-02-02 12:15:56 +01:00
Isabel Drost-Fromm df45c75594 Merge pull request #16151 from MaineC/enhancement/15178-sort-geosortbuilder
Refactor GeoSortBuilder
2016-02-02 12:14:35 +01:00
Alexander Reelsen 2366b3593f BWC: Added 1.7 version constants and bwc indices 2016-02-02 12:08:11 +01:00
Simon Willnauer 818a9eefb2 Make settings validation strict
This commit enableds strict settings validation on node startup. All settings
passed to elasticsearch either through system properties, yaml files or any other
way to pass settings must be registered and valid. Settings that are unknown ie. due to
typos or due to deprecation or removal will cause the node to NOT start up. Plugins
have to declare all their settings on the `SettingsModule#registerSetting` and settings for
plugins that are not installed must be removed.

This commit also removes the ability to specify the nodes name via `-Des.name` or just `name` in the
configuration files. The node name must be prefixed with the node prexif like `node.name: Boom`. Left over
usage of `name` will also cause startup to fail.
2016-02-02 11:32:44 +01:00
Isabel Drost-Fromm c108a4ce6d Make GeoDistanceSortBuilder serializable
Adds to GeoDistanceSortBuilder:

* equals
* hashcode
* writeto/readfrom
* moves xcontent parsing logic over
* adds roundtrip tests
* fixes roundtrip test for xcontent by keeping points just as geopoints not geohashes internally
* fixes xcontent parsing of ignore_malformed if coerce is set/unset
* adds exception to sortMode setter to avoid setting invalid sort modes

Relates to #15178
2016-02-02 11:24:32 +01:00
Tanguy Leroux a7fb5a27cc Mute IndexShardTests.testStressRelocated 2016-02-02 11:12:58 +01:00
Yannick Welsch 10b5ffcda5 Add proper handoff between old and new copy of relocating primary shard
When primary relocation completes, a cluster state is propagated that deactivates the old primary and marks the new primary as active.
As cluster state changes are not applied synchronously on all nodes, there can be a time interval where the relocation target has processed
the cluster state and believes to be the active primary and the relocation source has not yet processed the cluster state update and
still believes itself to be the active primary. This commit ensures that, before completing the relocation, the reloction source deactivates
writing to its store and delegates requests to the relocation target.

Closes #15900
2016-02-02 09:46:55 +01:00
Yannick Welsch e1006ea400 Add operation counter for IndexShard
Adds a container that represents a resource with reference counting capabilities. Provides operations to suspend acquisition of new references. Useful for resource management when resources are intermittently unavailable.

Closes #15956
2016-02-02 09:46:55 +01:00
Nik Everett d91a898f6a Merge pull request #16330 from nik9000/line_length_1
Start to break lines at 140 characters
2016-02-01 21:41:47 -05:00
Nik Everett 07cba65c1b Start to break lines at 140 characters
Its what we say our maximum line length is in CONTRIBUTING.md and it'd be
nice to have a check on that. Unfortunately, we don't actually wrap all lines
at 140.
2016-02-01 21:09:35 -05:00
Ryan Ernst 1152e79ec8 Merge pull request #16359 from rjernst/cli_errors
CliTool: Allow unexpected exceptions to propagate
2016-02-01 17:38:24 -08:00
Ryan Ernst a2c37c0989 CliTool: Allow unexpected exceptions to propagate
Cli tools currently catch all exceptions, and only print the exception
message, except when a special system property is set. Even with this
flag set, certain exceptions, like IOException, are captured and their
stack trace is always lost.

This change adds a UserError class, which can be used a cli tools to
specify a message to the user, as well as an exit status. All other
exceptions are propagated out of main, so java will exit with non-zero
and print the stack trace.
2016-02-01 16:35:22 -08:00
Jack Conradson e3fd6c2a00 Removed ..= token from the Lexer. Fixed related tests. 2016-02-01 16:16:04 -08:00
Ryan Ernst 7b5ed21d0d Remove reference to multicast docs, which no longer exist. 2016-02-01 11:27:03 -08:00
Tal Levy dcb88909d5 Merge pull request #16324 from talevy/ingest_on_failure_tag
Add processor tags to on_failure metadata in ingest pipeline
2016-02-01 10:13:26 -08:00
Jason Tedor 24a841a075 ShardId equality and hash code inconsistency
This commit fixes an inconsistency between ShardId#equals(Object),
ShardId#hashCode, and ShardId#compareTo(ShardId). In particular,
ShardId#equals(Object) compared only the numerical shard ID and the
index name, but did not compare the index UUID; a similar situation
applies to ShardId#compareTo(ShardId). However, ShardId#hashCode
incorporated the indexUUID into its calculation. This can lead to
situations where two ShardIds compare as equal yet have different hash
codes.

Closes #16319
2016-02-01 11:56:50 -05:00
Ryan Ernst 01b80b100e Merge pull request #16333 from rjernst/single_node_static
Make single node utility methods non-static
2016-02-01 08:46:54 -08:00
Daniel Mitterdorfer 3bee2d3195 Migrate Azure settings to new settings infrastructure
With this commit we migrate all Azure related settings to
the new settings infrastructure.
2016-02-01 16:34:28 +01:00
Ryan Ernst 6f12048cda Merge pull request #16326 from rjernst/remove_multicast
Remove multicast plugin
2016-02-01 07:27:12 -08:00
Ryan Ernst 3787f437ec Merge branch 'master' into remove_multicast 2016-02-01 07:25:45 -08:00
Ryan Ernst 661e3c99f7 Merge pull request #16336 from rjernst/demangle
Reduce complexity of plugin cli
2016-02-01 07:20:04 -08:00
Jason Tedor ed7bc5ba16 Unused variables in TransportReplicationAction 2016-02-01 08:12:34 -05:00
Colin Goodheart-Smithe 745e8f96e7 Moved http settings to the new settings infrastructure
The following settings were moved to Setting contents in HttpTransportSettings:

* http.cors.allow-origin
* http.port
* http.publish_port
* http.detailed_errors.enabled
* http.max_content_length
* http.max_chunk_size
* http.max_header_size
* http.max_initial_line_length

The following settings were removed:

* http.port
* http.netty.port
* http.netty.publish_port
* http.netty.max_content_length
* http.netty.max_chunk_size
* http.netty.max_header_size
* http.netty.max_initial_line_length
2016-02-01 12:56:41 +00:00
Simon Willnauer 008aa2c316 Merge pull request #16341 from s1monw/cache_settings
Convert PageCacheRecycler settings
2016-02-01 13:51:19 +01:00
Christoph Büscher 220bf7bd4b Merge pull request #16185 from cbuescher/ref-DirectCandidateGenerator
As a prerequisite for refactoring the whole PhraseSuggestionBuilder
to be able to be parsed and streamed from the coordinating node, the
DirectCandidateGenerator must implement Writeable, be able to parse
a new instance (fromXContent()) and later when transported to the
shard to generate a PhraseSuggestionContext.DirectCandidateGenerator.
Also adding equals/hashCode and tests and moving DirectCandidateGenerator
to its own DirectCandidateGeneratorBuilder class.
2016-02-01 13:17:54 +01:00
Christoph Büscher 61c435e6a9 PhraseSuggestionBuilde: Refactor DirectCandidateGenerator
As a prerequisite for refactoring the whole PhraseSuggestionBuilder
to be able to be parsed and streamed from the coordinating node, the
DirectCandidateGenerator must implement Writeable, be able to parse
a new instance (fromXContent()) and later when transported to the
shard to generate a PhraseSuggestionContext.DirectCandidateGenerator.
Also adding equals/hashCode and tests and moving DirectCandidateGenerator
to its own DirectCandidateGeneratorBuilder class.
2016-02-01 12:22:48 +01:00
Simon Willnauer aa5f9d5158 Convert PageCacheRecycler settings 2016-02-01 11:34:19 +01:00
Boaz Leskes 856883fcc5 Local Discovery - don't create a local DiscoNode, but use the one from cluster service
Long ago (#7834) the owner ship of the local disco node was centralized to the cluster service. LocalDiscovery is still created it's own disco node, which is not used by the cluster service and thus creating confusion (two nodes same name but different ids).

This commit also removes and optimization where when joining a new master we would first copy the master's metadata and only then pull in the rest of the cluster state (and it's nodes).

Closes #16317
2016-02-01 11:05:40 +01:00
Boaz Leskes df80e8f215 Migrate the rest of NettyTransport settings to the new infra
Also does some consistency clean up, renaming trasnport.netty.* settings to transport.*

Closes #16307
2016-02-01 10:26:52 +01:00
Simon Willnauer af0e40ec7d Merge pull request #16316 from s1monw/isseus/13685_2nd_try
Ensure all resoruces are closed on Node#close()
2016-02-01 10:17:57 +01:00
Clinton Gormley 880c60a982 Added missing breaking changes to 2.2 2016-02-01 09:51:36 +01:00
Clinton Gormley 35ef382369 Merge pull request #16332 from clintongormley/classloader_docs
Java Security Manager and scripting
2016-02-01 09:39:07 +01:00
Clinton Gormley 676078c53d Docs: Java Security Manager and scripting
Added docs explaining the impact of the Java Security Manager on scripting
languages, how to disable the JSM, and how to customise the classloader
whitelist.

Closes https://github.com/elastic/elasticsearch/issues/16094
Closes https://github.com/elastic/elasticsearch/issues/14290
2016-02-01 09:38:21 +01:00
Ryan Ernst a052dfeb38 Plugins: Reduce complexity of plugin cli
The plugin cli currently is extremely lenient, allowing most errors to
simply be logged. This can lead to either corrupt installations (eg
partially installed plugins), or confused users.

This change rewrites the plugin cli to have almost no leniency.
Unfortunately it was not possible to remove all leniency, due in
particular to how config files are handled.

The following functionality was simplified:
* The format of the name argument to install a plugin is now an official
  plugin name, maven coordinates, or a URL.
* Checksum files are required, and only checked, for official plugins
  and maven plugins. Checksums are also only SHA1.
* Downloading no longer uses a separate thread, and no longer has a timeout.
* Installation, and removal, attempts to be atomic. This only truly works
  when no config or bin files exist.
* config and bin directories are verified before copying is attempted.
* Permissions and user/group are no longer set on config and bin files.
  We rely on the users umask.
* config and bin directories must only contain files, no subdirectories.
* The code is reorganized so each command is a separate class. These
  classes already existed, but were embedded in the plugin cli class, as
  an extra layer between the cli code and the code running for each command.
2016-01-31 20:30:45 -08:00
LeeDr 001e1b4714 Tip for detecting init in docs
This commit adds a tip to the setup docs for how to detect whether the
user is running on a system that uses SysV-style init versus systemd.

Closes #16323
2016-01-31 13:49:28 -05:00
Ryan Ernst a398ba839c Tests: Make single node utility methods non-static
With the recent change to allow ESSingleNodeTestCase to specify plugins
and Version for the node, node creation became lazy, where it now
happens before the first test to run. However, there were many static
methods on ESSingleNodeTestCase that still try to access the node. This
change makes those methods non-static.
2016-01-31 09:58:41 -08:00
Jason Tedor 105411060c Uppercase ells ('L') in long literals
This commit removes and forbids the use of lowercase ells ('l') in long
literals because they are often hard to distinguish from the digit
representing one ('1').

Closes #16329
2016-01-30 22:16:02 -05:00
Lee Hinman 4e8623f8f4 Merge remote-tracking branch 'dakrone/add-ex-name-to-msg' 2016-01-30 16:28:03 -07:00
Lee Hinman 7e05b34708 Add Exception class name to message in `NotSerializableExceptionWrapper`
Previously it's possible to get errors like:

```
Caused by: NotSerializableExceptionWrapper[d:\shared_data\afs-issue-1-1\23]
```

Which doesn't tell us what the underlying exception type was that could
not be serialized.

This changes the message to prepend the
`ElasticsearchException.getExceptionName()` of the exception (which is a
underscore case of the class with the leading 'Elasticsearch' removed)
2016-01-30 16:27:24 -07:00