Commit Graph

10538 Commits

Author SHA1 Message Date
Michael McCandless b9358ccca8 Core: switch to auto IO throttle for merges
This adds a new boolean (index.merge.scheduler.auto_throttle) dynamic
setting, default true (matching Lucene), to adaptively set the IO rate
limit for merges over time.

This is more flexible than the previous fixed rate throttling because
it responds depending on the incoming merge rate, so search-heavy
applications that are not doing much indexing will see merges heavily
throttled while indexing-heavy cases will lighten the throttle so
merges can keep up within incoming indexing.

The fixed rate throttling is still available as a fallback if things
go horribly wrong.

Closes #9243

Closes #9133
2015-01-16 13:00:08 -05:00
Dmitry Polushkin 270d2f1fad Add chewy ruby client to docs
Closes #9322
2015-01-16 15:43:16 +01:00
Clinton Gormley c644c377ab Update api-conventions.asciidoc
Corrected explanation of fuzzy AUTO

Related to #9278
2015-01-16 14:26:50 +01:00
Boaz Leskes fb2e4da56c Add #8720 to the resiliency page
Closes #9277
2015-01-16 05:24:54 -08:00
Clinton Gormley f5b91c374a Update upgrade.asciidoc
Upgrade request needs pretty and human for the demonstrated output.

Closes #9313
2015-01-16 13:55:22 +01:00
Adrien Grand f6d5b3932a [TESTS] Mute OldIndexBackwardsCompatibilityTests. 2015-01-16 12:15:59 +01:00
Adrien Grand 1fc24a8837 Upgrade to lucene-5.1.0-snapshot-1652032.
This new Lucene snapshot does not have out-of-order scoring anymore.

Close #9318
2015-01-16 09:37:29 +01:00
Ryan Ernst 95bc7df289 Fix snapshot flag accidentally switched for 1.0 beta2 2015-01-15 23:57:46 -08:00
Ryan Ernst 1ee6ff0ea5 Tests: Add final missing static bwc index for 1.2.0
See #9297
2015-01-15 23:12:41 -08:00
Ryan Ernst 979f99af7f Remove irrelevant bwc comment 2015-01-15 23:02:02 -08:00
Robert Muir 365ec15d2b Backcompat: Fix backcompat for 0.90.0.Beta1 indexes 2015-01-15 22:54:26 -08:00
Ryan Ernst 8e864d037e Tests: Add tests for missing static indexes, and ensure newly added
versions will force indexes to be added.
2015-01-15 22:52:41 -08:00
Shay Banon 716cc5fb05 [TEST] Mmm, still wrap wrappers still its needed post closing dir
previous push was partial by mistake, we still need the wrapped dirs around after being closed for the test infra, for now, explicitly clear it in the leak test (which is still bad apple)
2015-01-15 17:57:47 -07:00
Shay Banon 683050c6ed [TEST] Mock Directory didn't clean wrapped dirs
I ran the bad apple test for index memory leaks and still saw leaks, it seems like we don't properly clean the dirs from the static mock test dir wrapper
2015-01-15 17:38:10 -07:00
David Haney 395960feef Docs: Updated standard token filter docs to indicate true behavior: doing nothing
Closes #9300
2015-01-15 21:33:29 +01:00
eBuildy 5c57db4aae A getHits() was forgotten!
(cherry picked from commit 11b3053)
(cherry picked from commit 89294e9)
2015-01-15 19:11:30 +01:00
Lee Hinman 5acf565e05 Add validator for `cluster.routing.allocation.disk` boolean settings
`cluster.routing.allocation.disk.include_relocations` and
`cluster.routing.allocation.disk.reroute_interval` are both boolean
settings, so they should have the `Validator.BOOLEAN` applied.

Fixes #9309
2015-01-15 11:11:16 +01:00
Michael McCandless def2d34f80 don't mention fixed throttling in the docs 2015-01-14 10:13:10 -05:00
Michael McCandless 107099affa put back fixed throttling, but off by default 2015-01-14 05:35:09 -05:00
Michael McCandless 87d8fbff28 put back fixed throttling, but off by default 2015-01-14 05:26:37 -05:00
Ryan Ernst f241125302 Internal: Change snapshot state for unreleased versions and add
validation tests for constants

Currently the snapshot flag for Version constants is only set to true
for CURRENT.  However, this means that the snapshot state changes from
branch to branch.  Instead, snapshot should be "is this version
released?".  This change also adds a validation test checking that
ID -> constant and vice versa are correct, and fixes one bug found there
(for an unreleased version).
2015-01-13 12:42:48 -08:00
Michael McCandless ff3e2cb569 remove version checks 2015-01-13 14:21:21 -05:00
Adrien Grand a56520d26d Internal: clean up memory reuse a bit.
- don't allow for soft references anymore in the recycler
 - remove some abusive thread locals
 - don't recycle independently float/double and int/long pages, they are the
   same and just interpret bits differently.

Close #9272
2015-01-13 18:08:12 +01:00
Adrien Grand d9165dfe73 Aggregations: simplifications.
BucketAggregationMode used to be part of the framework, now it's only an
implementation detail of the terms, histogram, geohash grid and scripted
aggregators.

Aggregator.estimatedBucketCount() was a complicated way to do the initial sizing
of the data structures, but it did not work very well in practice and was rather
likely to lead to over-sized data-structures causing OOMEs. It's removed now and
all data-structures start with a size of 1 and grow exponentially.

Aggregator.preCollection() is now symetric with postCollection(): it exists on
all aggregation objects where postCollection() also is and recursively calls its
children.

Fixed other minor issues related to generics and exceptions.

Close #9097
2015-01-13 18:05:09 +01:00
Adrien Grand b8be8e432e Query cache: Make the query cache usable on time-based data.
The query cache has a mechanism that disables it automatically when
SearchContext.nowInMillis() is used. One issue with that is that the date math
parser always evaluates the current timestamp when parsing a date, even if it
is not needed. As a consequence, whenever you use a date expression in your
queries, the query cache would not be used.

Close #9225
2015-01-13 17:23:59 +01:00
Luca Cavanna 4bdc89fca0 Java API: package private getters to become public if there have corresponding public setters
Some of our Java API requests have public setters but their corresponding getters are package private only. This commit makes those getters public as well.

Closes #9273
2015-01-13 15:22:01 +01:00
Adrien Grand d583080f20 Remove unused DoubleObjectPagedHashMap. 2015-01-13 10:49:32 +01:00
David Pilato be1610ba63 [Mapper] Using default=null for _timestamp field creates a index loss on restart
Step to reproduce:

* Create new index and type.

```
DELETE new_index
PUT new_index
 {
    "mappings": {
    	"power": {
	        "_timestamp" : {
	            "enabled" : true,
	            "default": null
	        }
	    }
    }
}
```

* Add a document

```
PUT new_index/power/1
{
    "foo": "bar"
}
```

* Restart cluster ... and **index is missing**...

```
GET new_index
```

Gives IndexMissingException

Closes #9223.

(cherry picked from commit e654a2c)
(cherry picked from commit aef3bc2)
2015-01-13 09:49:26 +01:00
Ryan Ernst 48bc132927 Mappings: Remove fieldSearchAnalyzer and fieldSearchQuoteAnalyzer from
MapperService.

Instead, get the FieldMapper for the field and check the analyzer there.
2015-01-12 14:53:18 -08:00
Ryan Ernst c29c18f0f2 Internal: Log when upgrade starts and stops
closes #9227
2015-01-12 14:40:04 -08:00
Paul Echeverri 4f938ad37e Updates the command to add the repo to not use add-apt-repository, which automatically adds a non-working deb-src line to sources.list. Command now uses echo to write the correct line to sources.list instead.
Fixes #9261
2015-01-12 21:18:00 +00:00
Ryan Ernst 69f74d714f Tests: Fix failure introduced in #8967 2015-01-12 09:27:27 -08:00
Ryan Ernst 6f214d791f Tests: Fix test failure introduced in #8967 2015-01-12 08:42:59 -08:00
Ryan Ernst 7d5a15e461 Mapping: serialize doc values settings for _timestamp
This change fixes _timestamp's serialization method to write out
`doc_values` and `doc_values_format`, which could already be set,
but would not be written out.

closes #8893
closes #8967
2015-01-12 08:26:59 -08:00
Tomoya Hirano 15d46988dc Fix typo in sample json
Fixes #9253
2015-01-12 15:58:16 +00:00
Lee Hinman a3972f03c6 Pass index settings where appropriate in IndicesLifecycle
This allows plugins to be able to perform some needed setup before and
after an index/shard is in use.
2015-01-12 15:04:37 +01:00
Lee Hinman 6b24921bd4 [TEST] Re-add rebalance disable setting in RecoveryFromGatewayTests 2015-01-12 14:21:31 +01:00
David Pilato 052645903a Rest: remove status code from main action
Today we give the HTTP status back within the HTTP response itself and within the JSON response as well:

```sh
curl localhost:9200/
```

```js
{
  "status" : 200,
  "name" : "Red Wolf",
  "version" : {
    "number" : "2.0.0",
    "build_hash" : "6837a61d8a646a2ac7dc8da1ab3c4ab85d60882d",
    "build_timestamp" : "2014-08-19T13:55:56Z",
    "build_snapshot" : true,
    "lucene_version" : "4.9"
  },
  "tagline" : "You Know, for Search"
}
```
2015-01-12 12:37:46 +01:00
tlrx 261eb5b5ce Windows: makes elasticsearch.bat more friendly to automated processes
On Windows platforms when JAVA_HOME is not defined, a message is printed on standard output and the bat script is paused until the user press a key. This behavior is not compliant to automated processes where elasticsearch.bat can be executed by another script. This commit adds a new parameter --silent / -s that allow to skip the pause. Also, the error message is directed to standard and error outputs.

 Closes #8913
2015-01-12 12:24:40 +01:00
David Pilato fc7a0d3a4a [Docs] fix three to four 2015-01-12 12:13:23 +01:00
Martijn van Groningen a88dd36df4 Test: Only run the test that verifies the `pending` field in the `_shards` header if the test cluster has two are more data nodes. 2015-01-12 10:29:23 +01:00
Michael McCandless 1aad275c55 expose current CMS throttle in merge stats; fix tests, docs; also log per-merge stop/throttle/rate 2015-01-11 05:52:43 -05:00
Michael McCandless 31e6acf3f2 first cut 2015-01-10 16:38:56 -05:00
Boaz Leskes 102e7adfad Recovery: be more resilient to partial network partitions
This commits adds a test that simulate disconnecting nodes and dropping requests during the various stages of recovery and solves all the issues that were raised by it. In short:

1) On going recoveries will be scheduled for retry upon network disconnect. The default retry period is 5s (cross node connections are checked every 10s by default).
2) Sometimes the disconnect happens after the target engine has started (but the shard is still in recovery). For simplicity, I opted to restart the recovery from scratch (where little to no files will be copied again, because there were just synced).
3) To protected against dropped requests, a Recovery Monitor was added that fails a recovery if no progress has been made in the last 30m (by default), which is equivalent to the long time outs we use in recovery requests.
4) When a shard fails on a node, we try to assign it to another node. If no such node is available, the shard will remain unassigned, causing the target node to clean any in memory state for it (files on disk remain). At the moment the shard will remain unassigned until another cluster state change happens, which will re-assigned it to the node in question but if no such change happens the shard will remain stuck at unassigned. The commits adds an extra delayed reroute in such cases to make sure the shard will be reassinged
5) Moved all recovery related settings to the RecoverySettings.

Closes #8720
2015-01-10 15:19:30 +01:00
Michael McCandless dd8000c865 use Lucene's 4.10.3 version constant 2015-01-10 06:25:39 -05:00
Simon Willnauer e416ed2426 Don't pass indexing buffer side to the translog 2015-01-09 23:45:27 +01:00
Ryan Ernst 4cda543637 Tests: Add logic to handle static index upgrade case where index is
already on latest version.

See #9207
2015-01-09 12:40:44 -08:00
Robert Muir d226a973f7 core: upgrade to lucene 5 r1650327.
refactor _version docvalues migration to be more efficient.

closes #9206
2015-01-09 12:12:31 -05:00
Colin Goodheart-Smithe 91e00c6c8e Aggregations: Numeric metric aggregations are now formattable
You can now specify `format` in the request definition for most numeric metric aggregations. The exceptions are Percentile_Ranks, Cardinality and Value_Count as the response type of these can be different from the field type so the formatter won't work.

Closes #6812
2015-01-09 16:10:58 +00:00
Christoph Büscher 04cb09f44c [TEST] Add missing docs and tests for '_cat/segments'
The '_cat/segments' api was missing docs and a rest test which are added here.

Closes #5856
2015-01-09 12:29:11 +01:00