Commit Graph

13835 Commits

Author SHA1 Message Date
Boaz Leskes 708320446e Doc: Minor typo fix in query_filter_context.asciidoc 2015-06-04 15:42:55 +02:00
Colin Goodheart-Smithe 39a20c3b5b Aggregations: Allow aggregation_binary to build and parse
Previously AggregationBuilder would wrap binary_aggregations in an aggregations object which would break parsing. This has been fixed so that for normally specified aggregations there are wrapped in an `aggregations` object, for binary aggregation which have the same XContentType as the builder it will use an `aggregations` field name and use the aggregationsBinary as the value (this will render the same as normal aggregations), and for binary aggregation with a different ContentType from the builder we use an `aggregations_binary` field name and add the aggregationsBinary as a binary value.

Additionally the logic in AggregationParsers needed to be changed as it previously did not parse `aggregations_binary` fields in sub-aggregations. A check has been added for the `aggregations_binary` field name and the binaryValue of this field is used to create a new parser and create the correct AggregatorFactories.

Close #11457
2015-06-04 12:52:14 +01:00
Clinton Gormley f85a17ff1a Docs: Fixed heading level for in query DSL docs 2015-06-04 13:16:32 +02:00
Simon Willnauer a522ddb4ac [TEST] Add more logging to allocation decision 2015-06-04 12:30:16 +02:00
Michael McCandless dae9750a83 regen back compat indices 2015-06-04 03:21:59 -04:00
Robert Muir f604182f8c Fix branch nuking 2015-06-04 01:02:02 -04:00
Robert Muir 1ff31ecf43 Don't bring in language plugins 2015-06-04 00:50:31 -04:00
Robert Muir 028cdde248 Use cp -R everywhere 2015-06-04 00:49:04 -04:00
Robert Muir 06a9df7cb8 Make migration script picky 2015-06-04 00:47:58 -04:00
Robert Muir 129d2b024e Remove plugins/ from gitignore 2015-06-04 00:45:33 -04:00
Clinton Gormley 171687d207 Docs: Reorganised the Query DSL docs into families and explaing query vs filter context 2015-06-04 01:59:37 +02:00
Michael McCandless 2c4d59584f only add units to a snapshot that was created before 2.0 2015-06-03 19:41:57 -04:00
Michael McCandless 3724756a1a cutover to getClass().getSimpleName() for settings names 2015-06-03 19:21:38 -04:00
Boaz Leskes 26d71fe00e Reduce shard inactivity timeout to 5m
To better distribute the memory allocating to indexing, the IndexingMemoryController periodically checks the different shard for their last indexing activity. If no activity has happened for a while, the controller marks the shards as in active and allocated it's memory buffer budget (but a small minimal budget) to other active shards. The recently added synced flush feature (#11179, #11336) uses this inactivity trigger to attempt as a trigger to attempt adding a sync id marker (which will speed up future recoveries).

We wait for 30m before declaring a shard inactive. However, these days the operation just requires a refresh and is light. We can be stricter (and 5m) increase the chance a synced flush will be triggered.

Closes #11479
2015-06-04 00:23:14 +02:00
Igor Motov 90cbf80fc4 Tests: remove race condition in the masterShutdownDuringSnapshotTest 2015-06-03 10:05:46 -10:00
Igor Motov f0e6addc53 Snapshot/Restore: sync up snapshot shard status on a master restart
When a snapshot operation on a particular shard finishes, the data node where this shard resides sends an update shard status request to the master node to indicate that the operation on the shard is done. When the master node receives the command it queues cluster state update task and acknowledges the receipt of the command to the data node.

The update snapshot shard status tasks have relatively low priority, so during cluster instability they tend to get stuck at the end of the queue. If the master node gets restarted before processing these tasks the information about the shards can be lost and the new master assumes that they are still in process while the data node thinks that these shards are already done.

 This commit add a retry mechanism that checks compares cluster state of a newly elected master and the current state of snapshot shards and updates the cluster state on the master again if needed.

Closes #11314
2015-06-03 09:02:04 -10:00
Simon Willnauer d621b160e9 Use the smallest version rather than the default version
The minimum version comparison was always using the default version
sicne the comparison was flipped.

Closes #11474
2015-06-03 20:56:28 +02:00
Simon Willnauer 7264fd4eb8 Fix possible BWC break after upgrading from pre 1.0.0
This is happening because of #4074 when we required that the top-level "query" is present to delete-by-query requests, but prior to that we required that it is not present. So the translog has a DBQ without "query" and when we try to parse it we hit this exception.

This commit adds special handling for pre 1.0.0 indices if we hit parse exception, we
try to reparse without a top-level query object to be BWC compatible for these indices.

Closes #10262

Conflicts:
	src/main/java/org/elasticsearch/index/shard/IndexShard.java
	src/test/java/org/elasticsearch/index/shard/IndexShardTests.java
2015-06-03 20:35:31 +02:00
Simon Willnauer aa248990bb Merge pull request #11468 from s1monw/cleanup_delete_by_query
Cleanup DeleteByQuery code from IndexShard
2015-06-03 20:05:33 +02:00
Alexander Reelsen b3779a03fc Test: Fix search query tests to use correct date, mark one test as awaitsfix 2015-06-03 19:01:29 +02:00
Alexander Reelsen 01e8eaf181 Date Parsing: Add parsing for epoch and epoch in milliseconds
This commit changes the date handling. First and foremost Elasticsearch
does not try to convert every date to a unix timestamp first and then
uses the configured date. This now allows for dates like `2015121212` to
be parsed correctly.

Instead it is now explicit by adding a `epoch_second` and `epoch_millis`
date format. This also means, that the default date format now is
`epoch_millis||dateOptionalTime` to remain backwards compatible.

Closes #5328
Relates #10971
2015-06-03 18:07:47 +02:00
Simon Willnauer 0f207bf4fb Cleanup DeleteByQuery code from IndexShard 2015-06-03 12:56:25 +02:00
Lee Hinman 5fd96d9371 [DOCS] Document the `index.shared_filesystem.recover_on_any_node` setting
Relates to #10960
Closes #11047
2015-06-03 12:35:25 +02:00
Tanguy Leroux a805cef045 Bulk: allow null values in action/metadata line parameters
Closes #11458
2015-06-03 12:20:41 +02:00
Ryan Ernst a3f51544d5 Merge pull request #11422 from rjernst/pr/fieldtype-mapper-split
Mappings: Refactor core index/query time properties into FieldType
2015-06-03 12:10:55 +02:00
Ryan Ernst 6598d82ae8 fix bad merge for parent field mapper, and change most field types to be
pkg-private and final
2015-06-03 12:10:23 +02:00
Ryan Ernst b625ddd17f Merge branch 'master' into pr/fieldtype-mapper-split 2015-06-03 11:37:41 +02:00
Igor Motov 59d9f7e157 Improve snapshot creation and deletion performance on repositories with large number of snapshots
Each shard repository consists of snapshot file for each snapshot - this file contains a map between original physical file that is snapshotted and its representation in repository. This data includes original filename, checksum and length. When a new snapshot is created, elasticsearch needs to read all these snapshot files to figure which file are already present in the repository and which files still have to be copied there. This change adds a new index file that contains all this information combined into a single file. So, if a repository has 1000 snapshots with 1000 shards elasticsearch will only need to read 1000 blobs (one per shard) instead of 1,000,000 to delete a snapshot. This change should also improve snapshot creation speed on repositories with large number of snapshot and high latency.

Fixes #8958
2015-06-02 12:22:21 -10:00
Michael McCandless 0247846e89 remove/downgrade nocommits 2015-06-02 16:54:15 -04:00
Michael McCandless 9bee35c391 make logged warning more stern 2015-06-02 16:24:19 -04:00
Michael McCandless e3494d78a7 add more byte-sized tests; make byte-size parsing code similar to time value parsing 2015-06-02 16:22:00 -04:00
Lee Hinman c381a64c66 Add missing `shard` object in trace logging statement 2015-06-02 14:10:14 -06:00
Michael McCandless e68a9076ba cleanup time value parsing; add/consolidate tests 2015-06-02 16:08:28 -04:00
Timur 6812ed0bb6 Docs: fix typo
Closes #112220
2015-06-02 19:42:45 +02:00
Shay Banon 740fe483bb Fail shard if search execution uncovers corruption
If, as part of the search execution, a corruption is uncovered, we should fail the shard
relates to #11419
2015-06-02 09:59:39 -07:00
Igor Motov 0b57f4611c Tests: Increase block timeout for snapshot to complete in batchingShardUpdateTaskTest
For a large number of shards in the test 10 seconds doesn't seem to be enough on some CI hardware.
2015-06-02 05:33:58 -10:00
jaymode f6191d05de add ability to prompt for selected settings on startup
Some settings may be considered sensitive, such as passwords, and storing them
in the configuration file on disk is not good from a security perspective. This change
allows settings to have a special value, `${prompt::text}` or `${prompt::secret}`, to
indicate that  elasticsearch should prompt the user for the actual value on startup.
This only works when started in the foreground. In cases where elasticsearch is started
as a service or in the background, an exception will be thrown.

Closes #10838
2015-06-02 09:38:07 -04:00
Lee Hinman a4e0ecc172 [TEST] Fix incorrect message in DiskThresholdDeciderTests 2015-06-01 15:45:26 -06:00
Lee Hinman bc179a735b Merge branch 'pr/11313' 2015-06-01 15:44:38 -06:00
Michael McCandless 51eae3ec3d parse longs not doubles, for the 'units missing' upgrade 2015-06-01 16:15:35 -04:00
jaymode d437135321 always normalize root paths during resolution of paths
Currently, when trying to determine if a location is within one of the configured repository
paths, we compare the root path against a normalized path but the root path is never
normalized so the check may incorrectly fail. This change normalizes the root path and
compares it to the other normalized path.

Relates to #11426
2015-06-01 15:10:42 -04:00
Kis Marcell 4261ee33c2 Issue #10588 Display low disk watermark to be consistent with
documentaiton

Change log entries, add convenience methods, unit tests

Correct allocation decision messages to display used space

Missed a word

Correct displayed threshold value
2015-06-01 20:58:46 +02:00
Michael McCandless 6c07c11ef5 allow upper-case time units 2015-06-01 13:12:44 -04:00
Michael McCandless 964ac4405b S does not mean the same as ms! also, allow decimal for S 2015-06-01 13:08:54 -04:00
Michael McCandless 79524c1041 add TODO to make case sensitivity consistent between byte sizes and times 2015-06-01 13:06:37 -04:00
Michael McCandless 75d9445323 add a few more tests 2015-06-01 12:47:12 -04:00
Britta Weber 4e206cd02d fix log message. exception first, parameters later 2015-06-01 16:38:48 +02:00
Colin Goodheart-Smithe ee08ab6c5c [TEST] fix failing script REST tests 2015-06-01 12:17:13 +01:00
Britta Weber d453699643 Merge pull request #11434 from brwe/open-search-contexts
search: release search contexts after failed dfs or query phase for d…
2015-06-01 13:15:51 +02:00
David Pilato 23b6847b5c Merge pull request #53 from Gasol/icu_transform_doc
Update documentation for ICU Transform
2015-06-01 09:08:25 +02:00