Commit Graph

21630 Commits

Author SHA1 Message Date
Pius 1364cc89f1 Update mapping.asciidoc
Changed "referrer to" to "refer to".
2016-04-25 23:35:42 -07:00
Jason Tedor 8a5032fae5 Remove unnecessary sleep from init script restart
Today when restarting Elasticsearch using the start-stop-daemon on
Debian-based systems using System V init, we sleep for one second
between the process successfully stopping and starting the process
again. This sleep is unnecessary as the stop function retries forever
until the previous instance successfully terminates. This commit removes
that unncessary sleep.

Relates #17966
2016-04-25 22:50:18 -04:00
Areek Zillur 4a1a03428d Add bwc support for pre-5.0 completion index
This commit adds support for reading and querying
completion fields that were indexed in 2.x
2016-04-25 21:21:56 -04:00
Ali Beyad d39eb2d691 Adds tombstones to cluster state for index deletions
Previously, we would determine index deletes in the cluster state by
comparing the index metadatas between the current cluster state and the
previous cluster state and decipher which ones were missing (the missing
ones are deleted indices).  This led to a situation where a node that
went offline and rejoined the cluster could potentially cause dangling
indices to be imported which should have been deleted, because when a node
rejoins, its previous cluster state does not contain reliable state.

This commit introduces the notion of index tombstones in the cluster
state, where we are explicit about which indices have been deleted.
In the case where the previous cluster state is not useful for index
metadata comparisons, a node now determines which indices are to be
deleted based on these tombstones in the cluster state.  There is also
functionality to purge the tombstones after exceeding a certain amount.

Closes #17265
Closes #16358
Closes #17435
2016-04-25 15:43:20 -04:00
Lee Hinman 08ac66f41e Change corruption explanation 2016-04-25 12:41:10 -06:00
Lee Hinman 89c25c5882 Update tests 2016-04-25 12:25:06 -06:00
Lee Hinman f4d688a2c4 Rewrite ClusterAllocationExplanation to be more object-y 2016-04-25 11:44:30 -06:00
Lee Hinman 1987107d75 Add the shard's store status to the explain API
This adds information similar to what is from the [shard stores
API](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-shards-stores.html)
to the cluster allocation explanation API (in fact, internally it uses
that API).

This means when you have a decision that otherwise could indicate that a
shard can go somewhere, you now have more information:

```json
{
  "shard" : {
    "index" : "i",
    "index_uuid" : "QzoKda9aQCG_hCaZQ18GEg",
    "id" : 0,
    "primary" : true
  },
  "assigned" : false,
  "unassigned_info" : {
    "reason" : "CLUSTER_RECOVERED",
    "at" : "2016-04-11T20:58:04.088Z"
  },
  "allocation_delay" : "0s",
  "allocation_delay_ms" : 0,
  "remaining_delay" : "0s",
  "remaining_delay_ms" : 0,
  "nodes" : {
    "24Qmw4tdRTuVOtjAdtmr5Q" : {
      "node_name" : "Vampire by Night",
      "node_attributes" : { },
      "final_decision" : "YES",
      "weight" : 7.0,
      "decisions" : [ ],
      "store" : {
        "allocation_id" : "aC6qVWA7TT2pgsalYxxUJQ",
        "store_exception" : "IndexFormatTooOldException[Format version is not supported (resource BufferedChecksumIndexInput(SimpleFSIndexInput(path=\"/home/hinmanm/scratch/elasticsearch-5.0.0-alpha1-SNAPSHOT/data/elasticsearch/nodes/0/indices/QzoKda9aQCG_hCaZQ18GEg/0/index/segments_1\"))): -1906795950 (needs to be between 1071082519 and 1071082519). This version of Lucene only supports indexes created with release 5.0 and later.]",
        "allocation" : "UNUSED"
      }
    }
  }
}
```

The "store" section is the new section, and will include allocation, id,
and the exception if there is one.

Relates to #17372
2016-04-25 09:36:38 -06:00
Sergii Golubev 2f6405ee27 serial-diff-aggregation.asciidoc: fix a mistake (#17950) 2016-04-25 07:45:54 -04:00
Jay Modi f2b563034c Merge pull request #17948 from jaymode/resource_watcher_settings
convert settings for ResourceWatcherService to new infrastructure
2016-04-25 07:08:40 -04:00
jaymode e70420ef2b convert settings for ResourceWatcherService to new infrastructure
This commit converts the settings for the ResourceWatcherService to use the new infrastructure and
registers the settings so that they do not cause errors when used.
2016-04-25 07:07:14 -04:00
Clinton Gormley d56a8e5dd8 Update index-apis.asciidoc
Asciidoc typo
2016-04-25 13:06:57 +02:00
Jason Tedor fd679a7021 Test min pool size of zero for scaling executor
This commit expands the configuration test for scaling executors to
include the case where the min pool size is set to zero.
2016-04-25 06:47:27 -04:00
Jason Tedor e6a06b272e Clarify message on resize scaling executor queues
This commit clarifies an error message that is produced when an attempt
is made to resize the backing queue for a scaling executor. As this
queue is unbounded, resizing the backing queue does not make sense. The
clarification here is to specify that this restriction is because the
executor is a scaling executor.
2016-04-25 06:47:27 -04:00
Jason Tedor d032de2df2 Cleanup o/e/c/u/c/EsExecutors.java
This commit removes two unused imports and applies a few other
formatting cleanups to EsExecutors.java.
2016-04-25 06:47:26 -04:00
Jason Tedor 5608fa7ac1 Actually bound the generic thread pool
This commit actually bounds the size of the generic thread pool. The
generic thread pool was of type cached, a thread pool with an unbounded
number of workers and an unbounded work queue. With this commit, the
generic thread pool is now of type scaling. As such, the cached thread
pool type has been removed. By default, the generic thread pool is
constructed with a core pool size of four, a max pool size of 128 and
idle workers can be reaped after a keep-alive time of thirty seconds
expires. The work queue for this thread pool remains unbounded.
2016-04-25 06:47:26 -04:00
jaymode 2606066e30 fix exists method for list settings when using numbered setting format
The list settings parser supports retrieving lists defined in settings that use a key followed by a `.` and a
number (for example `foo.bar.0`). However, the exists method would indicate that the provided settings
do not contain a value for this setting. This change makes it so that the exists method now handles this
format.
2016-04-24 20:36:58 -04:00
Lee Hinman 5fe1916be9 Merge pull request #17924 from elastic/russcam-patch-1
Update settings.asciidoc
2016-04-24 18:25:08 -06:00
Ryan Ernst 30eb72b9cb Merge pull request #17942 from rjernst/aggs_example_keyword
Docs: Update example aggs to use dynamic keyword field
2016-04-23 16:20:07 -07:00
Clinton Gormley b9978ace40 Update settings.asciidoc
Asciidoc typo
2016-04-23 13:44:42 +02:00
Russ Cam fb58ae3b4f Update settings.asciidoc
Add note for removal of index.translog.interval
2016-04-23 11:44:59 +10:00
Ryan Ernst 034adeb947 Docs: Update example aggs to use dynamic keyword field
The getting started docs use dynamic mappings. With the recent change to
string split into text and keyword, text lost the default ability to do
aggs. This was added back in #17188. This change updates the getting
started examples to use the keyword multi field added to dynamically
mapped text fields.

closes #17941
2016-04-22 16:34:15 -07:00
Xu Zhang 3e4b470f83 Fix icu IndexScope setting 2016-04-22 15:03:02 -07:00
Ryan Ernst d56d8b03c8 Merge pull request #17938 from rjernst/plugin_command_help
Cli: Improve output for usage errors
2016-04-22 14:58:13 -07:00
Ryan Ernst 49c47b24c1 Cli: Improve output for usage errors
When a cli throws a USAGE error, it is implied that the user did
something wrong, and probably needs help in understanding the cli
arguments. This change adds help output before the usage error is
printed.
2016-04-22 14:09:35 -07:00
Ryan Ernst d12a4bb51d Merge pull request #17933 from rjernst/camelcase4
Remove camelCase support
2016-04-22 13:46:43 -07:00
Xu Zhang 9ae723d516 Merge pull request #13651 from xuzha/icu
Adding support for customizing the rule file in ICU tokenizer
2016-04-22 12:59:06 -07:00
xuzha cd527c5b92 Add support for customizing the rule file in ICU tokenizer
Lucene allows to create a ICUTokenizer with a special config argument
enabling the customization of the rule based iterator by providing
custom rules files.

This commit enable this feature. Users could provide a list of RBBI rule
files to ICU tokenizer.

closes #13146
2016-04-22 12:39:20 -07:00
Ryan Ernst 858ca23b70 Merge pull request #17937 from rjernst/tools_cleanup
Remove ununsed dev tools files
2016-04-22 12:19:22 -07:00
Nik Everett cc1a55423c Reindex: properly mark things as child tasks
Do this by creating a Client subclass that automatically assigns the
parentTask to all requests that come through it. Code that doesn't want
to set the parentTask can call `unwrap` on the Client to get the inner
client instance that doesn't set the parentTask. Reindex uses this for
its ClearScrollRequest so that the request will run properly after the
reindex request has been canceled.
2016-04-22 14:00:11 -04:00
Lee Hinman 9da88a99da Fix exit code
Exit with proper exit code (1) and an error message if elasticsearch
executable binary does not exists or has insufficient permissions to
execute.

Squashed commit of the following:

commit 9768d316303418ba4f9c96d3f87c376048a1b1bc
Author: Puru <tuladharpuru@gmail.com>
Date:   Fri Apr 22 23:26:47 2016 +0545

    Fixed ES_HOME typo

commit 79a2b0394297f8b02b6f71b71ba35ff79f1a684e
Author: Puru <tuladharpuru@gmail.com>
Date:   Sun Apr 10 11:00:24 2016 +0545

    Improve elasticsearch startup script test

    Added improvement as per conversation in https://github.com/elastic/elasticsearch/pull/17082#issuecomment-206459613

commit 7be38e1fefd4baa6ccdbdc14745c00f6dc052e0c
Author: Puru <tuladharpuru@gmail.com>
Date:   Wed Mar 23 13:23:52 2016 +0545

    Add elasticsearch startup script test

    The test ensures that elasticsearch startup script exists and is executable.

commit d10eed5c08260fa9c158a4487bbb3103a8d867ed
Author: Puru <tuladharpuru@gmail.com>
Date:   Wed Mar 23 12:30:25 2016 +0545

    Fixed IF syntax and failure message

commit 6dc66f616545572485b4d43bee05a4cbbf1bed72
Author: Puru <tuladharpuru@gmail.com>
Date:   Sat Mar 12 11:08:11 2016 +0545

    Fix exit code

    Exit with proper exit code (1) and an error message if elasticsearch executable binary does not exists or has insufficient permissions to execute.
2016-04-22 11:48:05 -06:00
Ryan Ernst a6ba235964 Remove ununsed dev tools files 2016-04-22 10:34:11 -07:00
chenxiang a0aea5baf7 Update terms-query.asciidoc
user id of tweet hould exist in the `followers`, otherwise the search result is empty
2016-04-22 10:56:13 -06:00
ericamick 069eb72604 Update bucket.asciidoc 2016-04-22 10:54:25 -06:00
ericamick f081bf4e26 Update bulk.asciidoc 2016-04-22 10:51:33 -06:00
ericamick 3004c45f7b Update update.asciidoc 2016-04-22 10:50:42 -06:00
ericamick 276b89242c Update get.asciidoc 2016-04-22 10:48:58 -06:00
Ryan Ernst d4b3ff983f Merge pull request #17662 from rjernst/verbose_install
Plugin cli: Add verbose output with zip url when installing plugin
2016-04-22 09:26:30 -07:00
Ryan Ernst 55388590c1 Remove camelCase support
Now that the current uses of magical camelCase support have been
deprecated, we can remove these in master (sans remaining issues like
BulkRequest). This change removes camel case support from ParseField,
query types, analysis, and settings lookup.

see #8988
2016-04-22 09:18:10 -07:00
Nik Everett 531bdbfdbc createTask can return null
That is totally allowed.
2016-04-22 11:26:19 -04:00
Nik Everett cdf4778483 Fix javadoc 2016-04-22 11:26:19 -04:00
Nik Everett 51621f9d75 Remove ChildTaskRequest and always pass parentTaskId when building a task
Passing parentTaskId forces the caller to handle the parentTaskId.
2016-04-22 11:26:18 -04:00
Nik Everett ffeb5e38fc Remove parent-less task methods
Callers should explicitly handle parents - either using EMPTY_TASK_ID when
a parent isn't possible or piping parents from the TransportRequest when
possible.
2016-04-22 11:26:18 -04:00
Nik Everett 2b56a42b69 Move parentTaskId into TransportRequest
Now everything can have a parent!
2016-04-22 11:26:18 -04:00
Nik Everett 61f0b665b8 Fix fallback setting for two get/2 2016-04-22 11:10:01 -04:00
Nik Everett 1c2e84ba46 Fail request if rescore window > 10,000
The setting is named `index.max_rescore_window` and defaults to
`index.max_result_window` which defaults to 10,000.
2016-04-22 11:10:01 -04:00
Jason Tedor 21b1da1bea Kill thread local leak
This commit modifies InjectorImpl to prevent a thread local leak in
certain web containers. This leak can arise when starting a node client
inside such a web container. The underlying issue is that the
ThreadLocal instance was created via an anonymous class. Such an
anonymous class has an implicit reference back to the InjectorImpl in
which it was created. The solution here is to not use an anonymous class
but instead just create the reference locally and set it on the thread
local.

Relates #17921
2016-04-22 08:05:33 -04:00
Christoph Büscher a1c9025eaa Update completion-suggest.asciidoc
Removed trailing comma.
2016-04-22 14:00:37 +02:00
Martijn van Groningen c5ad2e2865 Changed indexed scripts to be stored in the cluster state instead of the `.scripts` index.
Also added max script size soft limit for stored scripts.

Closes #16651
2016-04-22 13:42:55 +02:00
Daniel Mitterdorfer ae61fc4780 Increase number of concurrent requests in NettyHttpRequestSizeLimitIT
For some seeds the number of concurrent requests previously defined
in NettyHttpRequestSizeLimitIT was too low to trigger the intended
breaker limit.

With this commit we increase the number of concurrent requests that
are sent to the test cluster thus triggering the limit.
2016-04-22 13:28:12 +02:00