Commit Graph

23988 Commits

Author SHA1 Message Date
Clinton Gormley 9cce45d4af Add cloud to S3/EC2 plugin docs 2016-08-24 15:38:43 +02:00
Simon Willnauer c499427166 Use _refresh instead of reading from Translog in the RT GET case (#20102)
Today we do a lot of accounting inside the engine to maintain locations
of documents inside the transaction log. This is only needed to ensure
we can return the documents source from the engine if it hasn't been refreshed.
Aside of the added complexity to be able to read from the currently writing translog,
maintainance of pointers into the translog this also caused inconsistencies like different values
of the `_ttl` field if it was read from the tlog or not. TermVectors are totally different if
the document is fetched from the tranlog since copy fields are ignored etc.

This chance will simply call `refresh` if the documents latest version is not in the index. This
streamlines the semantics of the `_get` API and allows for more optimizations inside the engine
and on the transaction log. Note: `_refresh` is only called iff the requested document is not refreshed
yet but has recently been updated or added.

#Relates to #19787
2016-08-24 15:30:08 +02:00
Clinton Gormley abc025e18b Fixed the reindex_rethrottle REST tests
The API was renamed from reindex.rethrottle to reindex_rethrottle
2016-08-24 14:55:02 +02:00
Clinton Gormley 336ec0ac9a Renamed REST spec reindex.rethrottle to reindex_rethrottle
There is already a reindex method, so reindex can't
also be used as a namespace.
2016-08-24 13:30:48 +02:00
Simon Willnauer 1b1a1acad8 Don't index the `_version` field (#20132)
The `_version` field doesn't allow to be searched anyway since it's
set `IndexOptions#NONE` for it instead.
2016-08-24 10:04:27 +02:00
Adrien Grand 5d6c9b0745 Fix RAM usage estimation of LiveVersionMap. #20123
I was writing tests for RAM usage estimation of LiveVersionMap and found a
couple issues:
 - The BytesRef objects used as uids were oversized since they were created
   via `new BytesRef(CharSequence)` which creates a `byte[]` whose size is 3x
   the length of the provided char sequence. Given that our uids are most of
   times ASCII sequences, this is a waste of memory.
 - `VersionValue` was using `translogLocation.size` instead of
   `translogLocation.ramBytesUsed()` for RAM estimation, which is completely
   unrelated to the memory footprint of the `Translog.Location` object.

In particular, the latter issue could cause RAM usage estimation to be
significantly overestimated, especially on large documents.

I also added tests for ram accounting.
2016-08-24 09:54:06 +02:00
Jason Tedor 5e6eb987bc Correct Vagrant boxes memory allocation
This commit corrects the memory allocation to the boxes uses for the
Vagrant tests to actually be 3 GB (really, this is just an OCD-driven
commit).
2016-08-23 23:12:24 -04:00
Nik Everett e55581bb67 Give vagrant test boxes 3gb of ram
Now that Elasticsearch defaults to 2gb heaps those boxes need more ram,
especially opensuse-13 for some reason. It has failed to run the
packaging tests ever since the change.....
2016-08-23 14:54:40 -04:00
Jason Tedor 90c2aae28b Remove minimum master nodes bootstrap docs
The minimum master nodes bootstrap check was removed in
069fc22696 but the docs were left behind.
This commit removes these stale docs.

Relates #20127
2016-08-23 14:31:58 -04:00
ddddn 6228b002c5 Update index_.asciidoc (#20125) 2016-08-23 20:08:52 +02:00
Nik Everett 5b34bec92a Add deprecation warnings to docs for geohash
Relates to #20126
2016-08-23 13:43:35 -04:00
Nik Everett 3b8701199f Fix packaging tests to test upgrading on disk groovy script 2016-08-23 11:55:11 -04:00
Lee Hinman 3298a4ed38 Revert "Merge remote-tracking branch 'dakrone/exclude-numerics-from-all'"
This reverts commit 514585290c, reversing
changes made to 8563c8d897.
2016-08-23 09:24:33 -06:00
Nicholas Knize 8234fad9ca Deprecate geohash parameters for geo_point parser
This commit deprecates all geohash parameters in the geo_point field parser.
2016-08-23 09:19:21 -05:00
Nicholas Knize 28ed0e7abf Deprecate optimize_bbox on geodistance queries
Deprecates the optimize_bbox parameter on geodistance queries. This has no longer been needed since version 2.2 because lucene geo distance queries (postings and LatLonPoint) already optimize by bounding box.
2016-08-23 09:14:54 -05:00
Nik Everett e22074c97f Add description to task in vagrant build 2016-08-23 09:58:32 -04:00
Daniel Mitterdorfer c13513ed61 Allow to enable annotation processing explicitly (#20117)
In 1e91f3b we disabled annotation processors globally. However, some
project like JMH need annotation processing, so we add an ability to
selectively enabled annotation processing for certain projects by
setting an external property in the corresponding Gradle build script.

Note that `javac` would allow to set a specific annotation processor
with the command line option `-processor`. However, due to a bug in
Gradle we we cannot use this option and need to enable all annotation
processors.
2016-08-23 15:15:22 +02:00
Simon Willnauer d685847b73 Use `refresh=true` in mapping/fields examples (#20120)
Fix field examples to make documents actually visible

This commit adds refresh calls to field examples an removes not working
`_routing` and `_field_names` script access.

Closes #20118
2016-08-23 13:32:14 +02:00
Michael McCandless 668dac722a Don't suppress AlreadyClosedException (#19975)
Catching and suppressing AlreadyClosedException from Lucene is dangerous because it can mean there is a bug in ES since ES should normally guard against invoking Lucene classes after they were closed.

I reviewed the cases where we catch AlreadyClosedException from Lucene and removed the ones that I believe are not needed, or improved comments explaining why ACE is OK in that case.

I think (@s1monw can you confirm?) that holding the engine's readLock means IW will not be closed, except if disaster strikes (failEngine) at which point I think it's fine to see the original ACE in the logs?

Closes #19861
2016-08-23 12:37:38 +02:00
Masaru Hasegawa f3cddef61e Merge pull request #20046 from masaruh/same_shard_host_setting
Move cluster.routing.allocation.same_shard.host setting to new settings infrastructure
2016-08-23 11:34:59 +09:00
Jack Conradson 131e370a16 Make Painless the default scripting language.
Closes #20017
2016-08-22 17:38:02 -07:00
Lee Hinman 514585290c Merge remote-tracking branch 'dakrone/exclude-numerics-from-all' 2016-08-22 12:36:25 -06:00
Thiago Souza 8563c8d897 Merge pull request #20042 from tsouza/fix/issue-19364
Use internal from/to when creating InternalDateRange.Bucket
2016-08-22 14:38:13 -03:00
Munish Goyal f9c17dd976 Correct sentence (#20088) 2016-08-22 16:20:14 +02:00
Simon Willnauer 29336b231b Add ref-counting to SearchContext to prevent accessing already closed readers (#20095)
When a SearchContext is closed it's reader / searcher reference is closed too.
If this happens while a search is accessing it's reader reference it can lead
to an unexpected `AlreadyClosedException` or worst case, an already closed MMapDirectory
is access causing a `SIGSEV` like in #20008 (even though the window for this is very small).

SearchContext can be closed concurrently if:
 * an index is deleted / removed from the node
 * a search context is idle for too long and is cleaned by the reaper
 * an explicit freeContext message is received

This change adds reference counting to the SearchContext base class and it's used
inside SearchService each time the context is accessed.

Closes #20008
2016-08-22 15:41:05 +02:00
Ali Beyad 3d7daa1a5a Removes the whitespace between the # (to comment out) and (#20094)
the setting in elasticsearch.yml, so that when a user uncomments
out a setting by just removing the #, the setting actually
takes effect. Before, it was very easy to uncomment out a
setting by just removing the #, leaving a single whitespace
character before the setting name, which would cause the
setting to not get picked up by Elasticsearch.

Closes #20090
2016-08-22 09:03:34 -04:00
Jim Ferenczi 8136c91cf0 Merge pull request #20096 from jimferenczi/index_mapper_dynamic
Fix docs stating that index.mapper.dynamic can be set for all node in the elasticsearch.yml file.
2016-08-22 10:51:12 +02:00
Jim Ferenczi 4bee565535 Fix docs stating that index.mapper.dynamic can be set for all nodes in the elasticsearch.yml file. This is not supported in 5.x (index settings cannot be set at the cluster level) and should be replace with a template for all indices. 2016-08-22 10:20:43 +02:00
Masaru Hasegawa c7e36536f6 Move cluster.routing.allocation.same_shard.host setting to new settings infrastructure
Fixes #20045
2016-08-22 11:07:42 +09:00
Ryan Ernst 6ed83ce36a Merge pull request #20072 from rjernst/remove_index_template_filter
Plugins: Remove IndexTemplateFilter
2016-08-19 21:13:20 -07:00
Ryan Ernst e7393529b1 Merge branch 'master' into remove_index_template_filter 2016-08-19 21:14:12 -07:00
Ryan Ernst 1a7a9d3c62 Merge pull request #20071 from rjernst/pull_shards_allocator
Plugins: Switch custom ShardsAllocators to pull based model
2016-08-19 20:55:31 -07:00
Ryan Ernst 3a9055b55d Merge pull request #20073 from rjernst/deguice_indices_service
Deguice IndicesService
2016-08-19 20:47:07 -07:00
Lee Hinman b6ec1ae6eb Rework documentation example for _all to be less ambigious with numerics 2016-08-19 16:44:38 -06:00
Lee Hinman d7e516c0b4 Default `include_in_all` for numeric-like types to false
This includes:

- All regular numeric types such as int, long, scaled-float, double, etc
- IP addresses
- Dates
- Geopoints and Geoshapes

Relates to #19784
2016-08-19 15:50:38 -06:00
Jason Tedor 6cda12871c Merge pull request #20083 from jasontedor/improve-startup-exception
Improve startup exception
2016-08-19 16:44:41 -04:00
Ali Beyad 1c9b64e09a Adds ignoreUnavailable option to the snapshot status API (#20066)
Adds ignoreUnavailable to the snapshot status API to be consistent
with the get snapshots API which has a similar parameter. If
ignoreUnavailable is set to true, then the snapshot status request
will ignore any snapshots that were not found in the repository,
instead of throwing a SnapshotMissingException.

Closes #18522
2016-08-19 16:19:56 -04:00
Jason Tedor c3849d9e7d Add print stack trace override to StartupException
StartupException overrides Throwable#printStackTrace(PrintStream) but
not Throwable#printStackTrace(PrintWriter). The former override is used
when the JVM terminates with an exception, but the latter override can
be used in some logging frameworks when rendering an exception (e.g.,
log4j). This commit adds an override for the latter, with the behavior
for the two overrides being the same.
2016-08-19 15:10:54 -04:00
Jason Tedor 3a6f7eb07a Rename StartupError to StartupException
This commit renames StartupError to StartupException. This rename is due
to the fact that this class inherits from Exception not Error in the
Throwable class hierarchy.
2016-08-19 14:53:08 -04:00
Ali Beyad cf32f8de34 Fixes tests so allocation ids in IndexMetaData is in sync with
what is in the RoutingTable
2016-08-19 14:42:02 -04:00
Jason Tedor 069fc22696 Remove minimum master nodes bootstrap check
This commit removes the minimum master nodes bootstrap check. The
motivation for this check was to raise awareness of the minimum master
nodes setting but this check gives a false sense of security because
it's too easy to set the setting to one when first standing up a cluster
and never update it when adding master-eligible nodes, or have it out of
sync on various nodes and still pass this check. Since this check does
not have the security that other bootstrap checks provide, it should be
removed in favor of a stronger guarantee in the future. We do log a
warning if an election occurs with minimum master nodes less than a
quorum of master-eligible nodes that participated in an election and
this is the best that we can do right now.

Relates #20082
2016-08-19 14:21:17 -04:00
Jason Tedor 503059d9a5 Merge pull request #20080 from jasontedor/min-heap-equals-max-heap
Set default min heap equal to default max heap
2016-08-19 13:55:26 -04:00
Thiago Souza 9ea3f4ace3 Use supported random methods instead of DateTime.now() 2016-08-19 14:09:15 -03:00
Jason Tedor 13e20e3320 Set external nodes to default to 512m of heap
This commit sets external nodes for integration tests to default to
using 512m of heap. This can be overridden using tests.heap.size (a
system property that we already use elesewhere for setting the size of
the heap for the test runner) or using tests.jvm.argline (this last one
takes precedence).
2016-08-19 12:55:48 -04:00
Thiago Souza 2ba508a761 Use a better name for unit test method 2016-08-19 13:53:15 -03:00
Jason Tedor 743b2ed1b2 Set default min heap equal to default max heap
This commit sets the default min heap equal to the default max
heap. This is to align the default out-of-box settings with the heap
size bootstrap check.
2016-08-19 12:29:48 -04:00
Yannick Welsch 57c3dcb7d7 Merge pull request #20075 from ywelsch/fix/update-cs-with-routingresult
Some time ago, AllocationService.reroute was changed to not only return updates to the routing table but also to the metadata (which contain primary terms and in-sync allocation ids). A lot of test code still only updates the routing table though, which is fixed by this PR.
2016-08-19 18:18:30 +02:00
Yannick Welsch 771668f380 Use routingResult method to update cluster state after reroute
This ensures that the routing table as well as the metadata (with the primary terms and in-sync allocation ids) is updated.
2016-08-19 17:15:02 +02:00
Adrien Grand b586465a4c Make generics explicit to please ECJ. 2016-08-19 15:55:24 +02:00
Tanguy Leroux 807da19150 [Doc] Update plugins intro about categories of plugins core/community 2016-08-19 14:12:10 +02:00