Commit Graph

10060 Commits

Author SHA1 Message Date
Colin Goodheart-Smithe 34b37ab7f0 [DOCS] Added documentation for log4j-extras dependency 2014-11-13 12:40:14 +00:00
Philip McMahon 4194a699c0 Logging: Add log4j-extras dependency
Close #7927
2014-11-13 12:39:30 +00:00
javanna c1428b5964 [DOCS] Expand logging documentation
Updated log4j link so it doesn't point to log4j 2.0 but version 1.2. Clarified which formats are supported and briefly explained what loggers and appenders are, plus added a link to the log4j docs.

Closes #5305
Closes #8455
2014-11-13 11:08:10 +01:00
Joel Taddei 7e72800c83 [DOCS] Corrected syntax error in search curl cmd
Closes #8447
2014-11-12 17:21:19 +01:00
Colin Goodheart-Smithe 972afe61a0 Mappers: Better validation of mapping JSON
Closes #7205
2014-11-12 14:32:25 +00:00
Mark Walkom bfd1bcd30a Updated threadpool documentation to elaborate/clarify what the pools are for and their values
Closes #8446
2014-11-12 22:33:38 +11:00
Martijn van Groningen 0b15859e33 Discovery: Removed unnecessary DiscoveryService reference from LocalDiscover, which causes circular Guice dependencies errors. 2014-11-12 11:25:41 +01:00
Israel Tsadok 7590629531 Docs: note about confusing disk threshold settings 2014-11-12 09:24:03 +01:00
Michael McCandless 7a22bfba3c Core: still don't load bloom filters, even when Directory instance doesn't have a codecService 2014-11-11 16:56:20 -05:00
Michael McCandless a783d342d2 Test: dump all threads when delete index fails during test cleanup 2014-11-11 10:49:26 -05:00
Martijn van Groningen 94c1a7dabe Docs: Fix incorrect documentation for the `index.query.parse.allow_unmapped_fields` setting.
The `index.query.parse.allow_unmapped_fields` setting can't influence whether unmapped fields are allowed
in alias filters and percolator queries.
2014-11-11 15:13:55 +00:00
Simon Willnauer 16cb0dc7a6 [TEST] Disable compression in BWC test for version < 1.3.2
The compression bug fixed in #7210 can still strike us since we are
running BWC test against these version. This commit disables compression
forcefully if the compatibility version is < 1.3.2 to prevent debugging
already known issues.
2014-11-11 14:12:34 +01:00
Lee Hinman f7d0f4d4e2 Refactor term analysis for simple_query_string prefix queries
Also fixes an issue where the token stream could be non-closed if an
exception occured.
2014-11-11 12:00:27 +01:00
Jörg Prante 8aa64c6b76 Query: add option for analyze wildcard/prefix also to simple_query_string query
The query_string query has an option for analyzing wildcard/prefix (#787) by a best effort approach.

This adds `analyze_wildcard` option also to simple_query_string.

The default is set to `false` so the existing behavior of simple_query_string is unchanged.
2014-11-11 10:12:17 +01:00
Michael McCandless 85fba3636a Test: restore logging to prior state 2014-11-10 18:09:12 -05:00
Michael McCandless 91bef2e40f Test: switch to TRACE logging for some components 2014-11-10 16:30:40 -05:00
Boaz Leskes 59117125b4 Internal: extend refresh-mapping logic to the _default_ type
When data nodes receive mapping updates from the master, the parse it and merge it into their own in memory representation (if there). If this results in different bytes then the master sent, the nodes will send a refresh-mapping command to indicate to the master that it's byte level storage of the mapping should be refreshed via the document mappers. This comes handy when the mapping format has changed, in a backwards compatible manner, and we want to make sure we can still rely on the bytes to identify changes.  An example of such a change can be seen at #4760.

This commit extends the logic to include the `_default_` type, which was never refreshed before. In some unlucky scenarios, this caused the _default_ mapping to be parsed with every cluster state update.

Closes #8413
2014-11-10 20:40:52 +01:00
Michael McCandless 87f6d6bc40 remove wrong repository 2014-11-10 14:14:11 -05:00
Michael McCandless 8aebb9656b Core: add max_determinized_states to query_string and regexp query/filter
This prevents too-difficult regular expressions from consuming
excessive RAM/CPU; the default max_determinized_states is 10,000 (same
as Lucene) but query_string and regepx query/filter can override
per-request.

The also upgrades to a new Lucene 5.0.0 snapshot.

Closes #8386

Closes #8357
2014-11-10 13:43:48 -05:00
Clinton Gormley f9810e591e Rest API: indices.delete should have "index" as a required param 2014-11-10 17:06:43 +01:00
Ryan Ernst ba621ee325 Scripting: Add score() back to AbstractSearchScript
See #8377
closes #8416
closes #8417
2014-11-10 07:46:46 -08:00
Clinton Gormley cff544dcc2 Docs: Removed old coming/added tags 2014-11-10 14:41:24 +01:00
Britta Weber c5a4c1d6b4 [docs] add 2d vis for decay functions and parameters
closes #8420
2014-11-10 10:56:41 +01:00
Colin Goodheart-Smithe d0da605a39 [TEST] added Get Index bwc test 2014-11-10 09:14:39 +00:00
Adrien Grand 144813629a Internal: Inverse DocIdSets' heuristic to find out fast DocIdSets.
DocIdSets.isFast(DocIdSet) has two issues:
 - it works on the DocIdSet interface while some doc sets can generate either
   slow or fast sets depending on their options (eg. whether an OrDocIdSet is
   fast or not depends on the wrapped clauses).
 - it only works because the result of this method is only taken into account
   when a DocIdSet has non-null `bits()`.

This commit changes this method to work on top of a DocIdSetIterator and to use
a black-list rather than a white list: slow iterators should really be the
exception rather than the rule.

Close #8380
2014-11-10 09:40:44 +01:00
Boaz Leskes a1d5bcaa35 Test: MinimumMasterNodesTests.testCanNotBringClusterDown should always set minimum master nodes. 2014-11-10 09:29:20 +01:00
Martijn van Groningen 696beb6e13 Core: Remove NestedDocsFilter, because it isn't used and also don't eagerly load it in bitset filter cache.
Closes #8414
2014-11-09 22:51:56 +00:00
Simon Willnauer 1368229075 [PING] Don't bubble up exception if we are shutting down and ping schedules get rejected 2014-11-09 19:27:45 +01:00
Simon Willnauer 0ff44d4d27 [STORE] Synchronize operations that modify file mappings on DistributorDirectory
The rename(String, String) method doesn't allow this implementation to use a simple
concurrent map. There is a race during a rename operation where files are not fully
renamed but already visible via #listAll(). This inconsistency can lead to problems
when opening commit points since the pending_segments_N as well as segments_N are visible
but not yet atomically renamed.

Yet, non of the methods that are synced are long running such that adding sychronization
doesn't introduce bottlenecks here. The Direcotry#sync(...) method is not synchronized since
it doesn't change any mapping nor does it depend on the mapping.
2014-11-09 19:05:33 +01:00
Simon Willnauer 2eccbf50fe [STORE] Calculate Alder32 Checksums for legacy files in Store#checkIntegrity
Previously we didn't calculate this checksums even though we have a checksum
to compare. Since we now also verify checksums for legacy files #checkIntegrity
should also calculate the legacy checksums.

Closes #8407
2014-11-09 18:18:59 +01:00
Chris Mattmann ca6555ba67 Docs: Fix some typos, and sentence structure.
Closes #8404
2014-11-09 11:36:36 +01:00
Michael McCandless 6bb7f7a76f more debug logging 2014-11-09 05:31:57 -05:00
Robert Muir 0eb3402795 Internal: harden recovery for old segments
When a lucene 4.8+ file is transferred, Store returns a VerifyingIndexOutput
that verifies both the CRC32 integrity and the length of the file.

However, for older files, problems can make it to the lucene level. This is not great
since older lucene files aren't especially strong as far as detecting issues here.

For example, if a network transfer is closed on the remote side, we might write a
truncated file... which old lucene formats may or may not detect.

The idea here is to verify old files with their legacy Adler32 checksum, plus expected
length. If they don't have an Adler32 (segments_N, jurassic elasticsearch?, its optional
as far as the protocol goes), then at least check the length.

We could improve it for segments_N, its had an embedded CRC32 forever in lucene, but this
gets trickier. Long term, we should also try to also improve tests around here, especially
backwards compat testing, we should test that detected corruptions are handled properly.

Closes #8399

Conflicts:
	src/main/java/org/elasticsearch/index/store/Store.java
	src/test/java/org/elasticsearch/index/store/StoreTest.java
2014-11-09 04:13:37 -05:00
Chris Mattmann f47fb6b1cf fix mention of Apache License, version 2.
Closes #8400
2014-11-08 19:14:51 +01:00
Veres Lajos 4059e4ac86 typo fixes - https://github.com/vlajos/misspell_fixer
Closes #8323
2014-11-08 18:55:57 +01:00
Clinton Gormley 08aa715d2e Update datehistogram-aggregation.asciidoc
Clarified use of fractional time units in the date histo agg.

Closes #7957
2014-11-08 17:49:34 +01:00
Clinton Gormley b9149f836b Docs: Improve the exists/missing filters documentation
Closes #7274
2014-11-08 16:57:41 +01:00
Clinton Gormley f5ad699284 Update multi-get.asciidoc
Documented that the fields parameter can be passed in the query string.

Closes #4006
2014-11-08 13:55:23 +01:00
Michael McCandless 37baba0f18 Core: add debug logging to InternalEngine.close 2014-11-08 05:49:20 -05:00
Michael McCandless 0298b6c3dd Tests: log how long IndexWriter.rollback took, and when MocmFSDirectory service started check index 2014-11-07 16:40:58 -05:00
javanna 3afe86d447 [TEST] fix term_vector realtime test to call wait for green and use no replicas
If a shard (e.g. replica) gets initialized after we indexed the document it gets refreshed internally and we find the doc and its term_vectors, thus the test fails
2014-11-07 20:05:14 +01:00
Lee Hinman 3712d97951 Take percentage watermarks into account for reroute listener
Fixes an issue where only absolute bytes were taken into account when
kicking off an automatic reroute due to disk usage. Also randomized the
tests to use either an absolute value or a percentage so this is tested.

Also adds logging for each node over the high and low watermark every
time a new cluster info usage is gathered (defaults to every 30
seconds).

Related to #8368
Fixes #8367
2014-11-07 12:58:10 +01:00
Simon Willnauer 67e6d623e1 [STORE] Drop pre 0.90 compression BWC
Pre 0.90 indices need to be upgraded to run with 2.0
we can drop the stored field compression BWC.
2014-11-07 12:43:15 +01:00
Robert Muir b8421e55fd Internal: temporarily ban buggy IOUtils methods with forbidden
Closes #8375
2014-11-07 06:32:43 -05:00
Simon Willnauer a49b39cc21 Allow -SNAPSHOT versions to be parsed by Version.fromString 2014-11-07 12:15:11 +01:00
Simon Willnauer cc8e8e6b89 [STATE] Observe cluster state on health request
Today we use busy waiting and sampling when we execute HealthReqeusts
on the master. This is tricky sicne we might sample a not yet fully applied
cluster state and make a decsions base on the partial cluster state. This can
lead to ugly problems since requests might be routed to nodes where shards are
already marked as relocated but on the actual cluster state they are still started.
Yet, this window is very small usually it can lead to ugly test failures.

This commit moves the health request over to a listener pattern that gets the actual
applied cluster state.

Closes #8350
2014-11-07 11:02:28 +01:00
Boaz Leskes 9192219f13 Discovery: don't wait joinThread when stopping
When a node stops, we cancel any ongoing join process. With #8327, we improved this logic and wait for it to complete before shutting down the node. However, the joining thread is part of a thread pool and will not stop until the thread pool is shutdown.

Another issue raised by the unneeded wait is that when we shutdown, we may ping ourselves - which results in an ugly warn level log. We now log all remote exception during pings at a debug level.

Closes #8359
2014-11-07 10:40:30 +01:00
Lee Hinman eb1add5eda Mark ShardRecoveryShandler class as final 2014-11-07 09:49:51 +01:00
Adrien Grand 79c4f53c21 Eclipse: change import settings to have the same order as IntelliJ IDEA. 2014-11-07 09:42:39 +01:00
Lee Hinman f0f6a2c396 Refactor shard recovery from anonymous class to ShardRecoveryHandler
Previously the bulk of our shard recovery code was in a 300-line
anonymous class in `RecoverySource`. This made it difficult to find and
more difficult to read.

This factors out that code into a `ShardRecoveryHandler` class, adding
javadocs for each function and phase of the recovery, as well as
comments explaining some of the more esoteric functions performed during
recovery.

It's hoped that this will help more people understand Elasticsearch's
recovery procedure.

No *major* functionality has changed, only typo corrections, some minor
allocation improvements and logging clarification changes.
2014-11-07 09:32:06 +01:00