Commit Graph

3998 Commits

Author SHA1 Message Date
Simon Willnauer 5008694ba1 Remove support for legacy checksums
Elasticsearch 5.0 doesn't support indices wiht legacy checksums anymore.
The last time we write legacy checksums was in 1.3.0 which was based
on lucene 4.9 already which means that all files have CRC32 checksums.
All indices that Elasticsearch can read today must be written with
lucene version >= 4.8 anyway so we can drop this layer of backwards
compatibility entirely.

Since we are close to upgrading to Lucene 6.0 we should get rid of this
in a more contiained change than the lucene upgrade.
2016-03-03 22:58:18 +01:00
Simon Willnauer 6a76fa3382 Use SleepingWrapper on shared filesytems
On shared FS / shadow replicas we rely on a lock retry if the lock has
not yet been relesed on a relocated primary. This commit adds this `hack`
for shared filesystems only.

Closes #16936
2016-03-03 21:43:12 +01:00
Lee Hinman 6adbbff97c Fix organization rename in all files in project
Basically a query-replace of "https://github.com/elasticsearch/" with "https://github.com/elastic/"
2016-03-03 12:04:13 -07:00
Lee Hinman f9d1f95e84 [TEST] mark IndexWithShadowReplicasIT with awaitsfix 2016-03-03 11:14:06 -07:00
Jason Tedor 166259db64 Use and test relative time in TransportBulkAction
This commit modifies TransportBulkAction to use relative time instead of
absolute time when measuring how long a bulk request took to be
processed, and adds tests for this functionality.

Closes #16916
2016-03-03 11:53:53 -05:00
Jason Tedor e75a0da4d5 Add max number of processes check
This commit adds a bootstrap check on Linux for the max number of
processes available to the user running the Elasticsearch process.

Closes #16919
2016-03-03 11:40:10 -05:00
Simon Willnauer 244caa3618 Remove writeLockTimeout from InternalEngine
`writeLockTimeout` has been removed in Lucene 6 completely and since we have
the shard locking mechanism now for quite a while we don't need this anymore.
Shards should only be allocated once all resources are released such that there
can't be any other shard holding the lock to that index in any sane situation.
2016-03-03 16:40:24 +01:00
Martijn van Groningen 7a3da93551 Merge branch 'pr/16923' 2016-03-03 15:58:38 +01:00
Martijn van Groningen f0e80e1a7a replaced integration test with unit test.
Closes #16692
2016-03-03 15:31:57 +01:00
Adrien Grand 2c3e4840f2 Store _all payloads on 1 byte instead of 4. #16899
This changes the `_all` field to store per-field boosts using a single byte
similarly to norms.
2016-03-03 15:00:23 +01:00
Jim Ferenczi c996db731a Merge pull request #16922 from jimferenczi/fix_match_query_tests
Fix sporadic error on match query test when a fuzziness of 0s is used.
2016-03-03 14:29:47 +01:00
Jim Ferenczi c76949ddd5 After review 2016-03-03 12:19:07 +01:00
Jim Ferenczi 06bef0ca6b Fix sporadic error on match query test when a fuzziness of 0s is used on a date field. 2016-03-03 11:54:07 +01:00
Alexander Kazakov 98c164c3f0 Check that parent_type in HasParent query has child types #16692 2016-03-03 13:32:22 +03:00
Adrien Grand eef19be072 Deprecate string in favor of text/keyword. #16877
This commit removes the ability to use string fields on indices created on or
after 5.0. Dynamic mappings now generate text fields by default for strings
but there are plans to also add a sub keyword field (in a future PR).

Most of the changes in this commit are just about replacing string with
keyword or text. Some tests have been removed because they existed because of
corner cases of string mappings like setting ignore-above on a text field or
enabling term vectors on a keyword field which are now impossible.

The plan is to remove strings entirely in 6.0.
2016-03-03 10:20:56 +01:00
Daniel Mitterdorfer f70e5aca50 Merge remote-tracking branch 'danielmitterdorfer/simplify-azure-settings' 2016-03-03 10:02:35 +01:00
Daniel Mitterdorfer 52acf0e6e1 Use new settings infra to parse AzureStorageSettings
With this commit we simplify the parsing logic in AzureStorageSettings
by leveraging the new settings infrastructure.

Closes #16363
2016-03-03 10:01:14 +01:00
Jason Tedor f35bad808c Fix case in mlockall check error message 2016-03-02 22:43:20 -05:00
Jason Tedor 62638b8212 Fix case in mlockall check error message 2016-03-02 22:12:18 -05:00
javanna 45b7b5175c [TEST] add unit test for DiscoveryNodes node selectors 2016-03-02 21:59:20 +01:00
javanna 04947a5fef Remove DiscoveryNode#shouldConnectTo method
This method was originally introduced to prevent client nodes from connecting to other client nodes directly in the cluster. That said, it worked only if node.client was set to true and not when node.master and node.data were both set to false. It looks safe to remove, which allows to solve all kinds of problems around monitoring that happen wherever there are 2 or more clients nodes in the cluster, and a REST call hits one of them (node counts are off, clients nodes are missing).
2016-03-02 21:59:20 +01:00
Simon Willnauer 1e70e16c89 Merge pull request #16866 from s1monw/only_address_for_http
Use HttpInfo in cat/_nodes instead of node attribute
2016-03-02 21:48:35 +01:00
Simon Willnauer 8fbdd3334f Use HttpInfo in cat/_nodes instead of node attribute
The node attribute also renders the type of the inet address
as well as the host name which is unneeded in the cat action.
2016-03-02 21:33:36 +01:00
Michael McCandless 4df83dc9a5 Merge pull request #16661 from camilojd/feature/disk-segments-stats
Segments stats in indices stats API now optionally includes aggregated file sizes by file extension / index component
2016-03-02 13:58:20 -05:00
javanna 72e4c26d0e _cat/nodeattrs: remove unnecessary nodes stats call 2016-03-02 17:14:49 +01:00
javanna fd70d60457 Remove http_address from _cat/nodeattrs
This was recently added with #16770 but it turns out it is not a proper node attribute, so it is enough to print out as part of _cat/nodes only.
2016-03-02 17:14:49 +01:00
Jason Tedor 99aa4942d2 Add more missed final keywords in BootstrapChecks 2016-03-02 10:00:44 -05:00
Jason Tedor 0c914b51c7 Add missed final keywords in BootstrapChecks 2016-03-02 09:57:26 -05:00
Jason Tedor f2220c9786 Add mlockall bootstrap check
This commit adds a boostrap check for the situation bootstrap.mlockall
is enabled, but memory was not able to be locked.

Closes #16909
2016-03-02 09:51:31 -05:00
Jason Tedor 6caec9bc25 Display if node is snapshot build on startup
Recent simplifications to org.elasticsearch.Version led to "-SNAPSHOT"
to not be displayed in the node version upon startup. Yet, this is
useful information to have. This simple commit adds back the display of
"-SNAPSHOT" in the version on startup if the build is a snapshot build.

Closes #16908
2016-03-02 09:41:23 -05:00
Martijn van Groningen 27ea143c3f Revert "bulk api: use `System.nanoTime()` instead of `System.currentTimeMillis()` to compute the estimated took time"
This reverts commit 82567f1bdf.

`System.nanoTime()` was being called from multiple threads causing the timing to be incorrect.
2016-03-02 15:20:54 +01:00
Jason Tedor 9ad5919002 Refactor bootstrap checks
This commit refactors the bootstrap checks into a dedicated class. The
refactoring provides a model for different limits per operating system,
and provides a model for unit tests for individual checks.

Closes #16844
2016-03-02 08:47:16 -05:00
Christoph Büscher 299b9d9b63 Fix NPE in SearchSourceBuilder
Prevent a NPE when parsing `fields` parameter and internal field name
list has not been initialized.

Closes #16902
2016-03-02 12:25:29 +01:00
Martijn van Groningen 82567f1bdf bulk api: use `System.nanoTime()` instead of `System.currentTimeMillis()` to compute the estimated took time
In this case we compute elapsed time and `System.nanoTime()` is designed to do just do that.
The absolute timing `System.currentTimeMillis()` provides in not needed and the relative timing `System.nanoTime()` provides is likely to be more accurate.
2016-03-02 09:20:24 +01:00
Camilo Díaz Repka 356364810c Implementation of Segment disk stats aggregating sizes by index file extension.
Use 'includeSegmentFileSizes' as the flag name to report disk usage.
Added test that verifies reported segment disk usage is growing accordingly after adding a document.
Documentation: Reference the new parameter as part of indices stats.
2016-03-01 23:16:49 -03:00
Chris Earle ea2792e278 Adjusting based on comments. 2016-03-01 17:18:09 -05:00
Chris Earle 8fa0d8e905 Add LifecycleRunnable
I've noticed throughout the code that we have a need to remove the boilerplate lifecycle check when starting/rescheduling certain runnables. This provides a simpler implementation to get this functionality without duplicating it.
2016-03-01 17:18:09 -05:00
Jason Tedor aa8ee74c6c Bump Elasticsearch version to 5.0.0-SNAPSHOT
This commit bumps the Elasticsearch version to 5.0.0-SNAPSHOT in line
with the alignment of versions across the stack.

Closes #16862
2016-03-01 17:03:47 -05:00
Ali Beyad 72ed01c304 Add AwaitsFix annotation to the sporadically failing test
DiscoveryWithServiceDisruptionIT.testIndicesDeleted pending a fix for
that test (see issue #16890).
2016-03-01 14:04:04 -05:00
Martijn van Groningen 75387001df Added `ingest_took` to bulk response to indicate how much time was spent on ingest preprocessing.
The `ingest_took` is separate from `took`, which keeps track how much time is spent on indexing/deleting/updating.
The `ingest_took` is only visible in the rest response if at least for one bulk item has ingest enabled.
2016-03-01 18:24:26 +01:00
Yannick Welsch d5304c7d41 Add additional fallback to http.publish_port and transport.publish_port
In case where the publish address is different to all bound addresses and an explicit publish_port
setting is not provided, the publish_port is now selected as the unique port of bound addresses.
An exception is thrown in case of ambiguities.

Closes #16626
2016-03-01 16:28:13 +01:00
Nik Everett c7c8bb357a Merge pull request #16861 from nik9000/reindex_is_ready
Reindex required some parsing changes for search requests to support
differing defaults from the regular search api.
2016-03-01 10:02:48 -05:00
Ali Beyad 83d1e0985d Index deletes not applied when cluster UUID has changed
If a node was isolated from the cluster while a delete was happening,
the node will ignore the deleted operation when rejoining as we couldn't
detect whether the new master genuinely deleted the indices or it is a
new fresh "reset" master that was started without the old data folder.
We can now be smarter and detect these reset masters and actually delete
the indices on the node if its not the case of a reset master.

Note that this new protection doesn't hold if the node was shut down. In
that case it's indices will still be imported as dangling indices.

Closes #16825
Closes #11665
2016-03-01 09:49:42 -05:00
javanna 5fb4d73e89 Cat nodes api: fix typo in help output 2016-03-01 15:36:54 +01:00
javanna a70be3a10f Cat nodes api: prevent NPEs in case there are multiple client nodes
If you connect to a client node and call _cat/nodes, and there is at least another client node in the cluster, the http address cannot be retrieved thus we get an NPE. This commit prevents an NPE from being thrown. This bug was introduced with #16770
2016-03-01 15:36:42 +01:00
Martijn van Groningen 8182a282d4 removed unused imports and an unused field 2016-03-01 14:12:26 +01:00
Martijn van Groningen a5c0f77f1d ingest: use diffs for ingest metadata 2016-03-01 13:57:31 +01:00
Luca Cavanna d81bfe6f30 Merge pull request #16880 from javanna/enhancement/rename_search_service_transport_action
Rename SearchServiceTransportAction to SearchTransportService
2016-03-01 12:58:28 +01:00
Boaz Leskes b224cc8898 Node.stop() should stop Discovery
It used to do so through the DiscoveryService but that was removed in #16821 , but I forgot to add an explicit discovery stop
2016-03-01 12:51:38 +01:00
javanna b7597d7aea Rename SearchServiceTransportAction to SearchTransportService
The suffix TransportAction is misleading as it may make think that it extends TransportAction, but it does not. This class makes accessible the different search operations exposed by SearchService through the transport layer. Also resolved few compiler warnings in the class itself.
2016-03-01 11:35:04 +01:00