Commit Graph

10840 Commits

Author SHA1 Message Date
Boaz Leskes e684d7fde4 Logging: improve logging messages added in #9562 & #9562
Closes #9603
2015-02-06 22:26:16 +01:00
Robert Muir 66b5ed86f7 fix typo 2015-02-06 09:07:08 -05:00
Robert Muir 9c9b5c27d3 Upgrade to Lucene r1657571.
Closes #9587

Squashed commit of the following:

commit 23ac91dca4b949638ca1d3842fd6db2e00ee1d36
Author: Adrien Grand <jpountz@gmail.com>
Date:   Thu Feb 5 18:42:28 2015 +0100

    Do not compute scores if aggregations do not need it (like top_hits) or use a script (which might compute scores).

commit 51262fe2681c067337ca41ab88096ef80a2e8ebb
Author: Adrien Grand <jpountz@gmail.com>
Date:   Thu Feb 5 15:58:38 2015 +0100

    Fix more compile errors.

commit a074895d55b8b3c898d23f7f5334e564d5271a56
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Feb 5 09:31:22 2015 -0500

    fix a few more obvious ones

commit 399c41186cb3c9be70107f6c25b51fc4844f8fde
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Feb 5 09:28:32 2015 -0500

    fix some collectors and queries

commit 5f46c2f846c5020d5749233b71cbe66ae534ba51
Author: Robert Muir <rmuir@apache.org>
Date:   Thu Feb 5 09:24:24 2015 -0500

    upgrade to lucene r1657571
2015-02-06 08:53:20 -05:00
Boaz Leskes 487ef80c35 Test: testRelocationWithBusyClusterUpdateThread - CountDownLatch.countDown should be await 2015-02-06 14:31:19 +01:00
Boaz Leskes 45ecb49a09 Test: testRelocationWithBusyClusterUpdateThread - use cluster state listener instead of assertBusy 2015-02-06 14:27:27 +01:00
Boaz Leskes 1b7920f202 Test: add document indexing back to testCancellationCleansTempFiles
It was lost during a merge conflict in 796aa5c3fe2424390a8edee604cd292b8afdf514
2015-02-06 12:54:30 +01:00
Christoph Büscher dfc0496fc0 Add warning to settings documentation about setting number_of_replicas on a closed index
Issue #9566 raises the point that setting the number of shards on a closed index can lead to this index not beeing able to open again. This change in documentation is ment to warn the user about this issue.
2015-02-06 12:09:24 +01:00
Boaz Leskes 23022227d4 Recovery: add a timeout to local mapping change check
After phase1 of recovery is completed, we check that all pending mapping changes have been sent to the master and processed by the other nodes. This is needed in order to make sure that the target node has the latest mapping (we just copied over the corresponding lucene files). To make sure we do not miss updates, we do so under a local cluster state update task. At the moment we don't have a timeout when waiting on the task to be completed. If the local node update thread is very busy, this may stall the recovery for too long. This commit adds a timeout (equal to `indices.recovery.internal_action_timeout`) and upgrade the task urgency to `IMMEDIATE`. If we fail to perform the check, we fail the recovery.

Closes #9575
2015-02-06 10:06:47 +01:00
Ryan Ernst c6968883a7 Mappings: Remove support for new indexes using path setting in
object/nested fields or index_name in any field

Backcompat is still here for indexes created before 2.0.

closes #6677
2015-02-05 12:44:43 -08:00
Boaz Leskes 9362ba200d Gateway: add logging around gateway shard allocation
This commit adds more logs around the gateway shard allocation. Any errors while reaching out to nodes to list the local shards are logged in `WARN`. Shard info loading time is logged under DEBUG. Also, we log a `WARN` message if an exception forces a full checksum check during reading the store metadata

Closes #9562
2015-02-05 18:06:33 +01:00
Adrien Grand 95f46f1212 Docs: Use the new experimental annotation.
We now have a very useful annotation to mark features or parameters as
experimental. Let's use it! This commit replaces some custom text warnings with
this annotation and adds this annotation to some existing features/parameters:
 - inner_hits (unreleased yet)
 - terminate_after (released in 1.4)
 - per-bucket doc count errors in the terms agg (released in 1.4)

I also tagged with this annotation settings which should either be not needed
(like the ability to evict entries from the filter cache based on time) or that
are too deep into the way that Elasticsearch works like the Directory
implementation or merge settings.

Close #9563
2015-02-05 15:29:45 +01:00
Adrien Grand 3a486066fd Docs: Remove the experimental status of the cardinality and percentiles(-ranks) aggregations
These aggregations are not experimental anymore but some of their parameters
still are:
 - `precision_threshold` and `rehash` on `cardinality`
 - `compression` on percentiles(-ranks)

Close #9560
2015-02-05 15:18:40 +01:00
Boaz Leskes f7fe6b7461 Test: add awaitFix to testFullRollingRestart 2015-02-05 13:00:03 +01:00
Boaz Leskes 1b8c0056d3 Test: StaticIndexBackwardCompatibilityTest.unloadIndex should call assertAllFilesClosed
That method checks that files were release properly, but also clears a static map holding references to mock directories. Since we iterate on many indexes this created memory pressure.
2015-02-05 12:12:25 +01:00
Boaz Leskes 97ac2f5144 Test: add awaitFix to SearchWithRandomExceptionsTests
disabling this until further discussion. Recent failures probably relate to #9211 & #8720 (+ friends)
2015-02-05 11:41:02 +01:00
Masaru Hasegawa b4f7d26723 Fielddata: Change threshold value of fielddata.filter.frequency.max/min
Make it consider 1.0 as 100% instead of aboslute count 1.

Closes: #9327
2015-02-05 13:27:42 +09:00
Ryan Ernst 65e41f2ec3 release tool: Improve output for open github issues 2015-02-04 14:34:33 -08:00
Reuben Sutton 2436552840 Raise an exception on an array of values being sent as the factor for a field_value_factor query
closes #7408
2015-02-04 14:17:09 -07:00
Simon Willnauer 4732ef3484 [ENGINE] Remove FlushType and make resources final in InternalEngine
This commit removes the FlushType entirely and replaces it in the most places with
a simple `Engine#flush()` call. Flushing without committing the translog is now
entirely private to the engine and is only called in one place.
2015-02-04 18:42:58 +01:00
Adam 928ea82188 Docs: Updated documentation for query-string-syntax to include '>' '<' and '=' as reserved characters
Closes #9518
2015-02-04 17:55:15 +01:00
Simon Willnauer 0c5599e1d1 [ENGINE] Remove full flush / FlushType.NEW_WRITER
The `full` option and `FlushType.NEW_WRITER` only exists to allow
realtime changes to two settings (`index.codec` and `index.concurrency`).
Those settings are very expert and don't really need to be updateable
in realtime.
2015-02-04 17:38:05 +01:00
Boaz Leskes 7beaaaef62 Discovery: publishing timeout to log at WARN and indicate pending nodes
When the master publishes a new cluster state it waits (by default) for up to 30s for all nodes to respond. If not it continues to process other pending tasks. At the moment, this timeout is logged under DEBUG but it typically represent a serious issue with one or more of the nodes. We should log it in WARN and give the nodes that failed to respond in a timefly fashion

Closes #9551
2015-02-04 16:39:01 +01:00
Adrien Grand 8b76cd76f9 Internal: Avoid unnecessary utf8 conversion when creating ScriptDocValues for a string field.
This regression was introduced in #6908: the conversion from RandomAccessOrds
to SortedBinaryDocValues goes through Strings while both impls actually work
on BytesRef, so the SortedBinaryDocValues instance could directly return the
BytesRefs returned by the RandomAccessOrds.

Close #9306
2015-02-04 09:53:34 +01:00
javanna 74c7b5a197 Internal: add AliasesRequest interface to mark requests that manage aliases
We currently have the IndicesRequest interface to mark indices related requests and be able to retrieve the indices they relate to in a generic way. This commit introduces a similar abstraction for requests that manage aliases, to be able to retrieve/replace the aliases they relate to.

Also, IndicesAliasesRequest becomes a CompositeIndicesRequest, as it allows to perform multiple operations (e.g. add/remote multiple aliases). Each single operation (AliasActions) implements now the newly introduced AliasesRequest.

AliasesRequest is also implemented by GetAliasesRequest, which allows to retrieve aliases information.

Closes #9460
2015-02-04 07:59:33 +01:00
Boaz Leskes 896e8657ea Discovery: check index uuid when merging incoming cluster state into local
In big deployment ClusterState can be large. To make sure we keep reusing objects that were promoted to the Old Gen, ZenDiscovery has an optimization where it tries to reuse existing IndexMetaData object (containing among other things the mappings) from the current cluster state if they didn't change. The comparison currently uses the index name and the metadata version. This is however not enough and we should also check the index uuid. In extreme cases, where cluster state processing is slow and the index in question is deleted and recreated and these operations are batch processed together, we can use the wrong meta data if the version is also identical. This can happen if people create the index with all meta data predefined and no settings were changed.

Closes #9489
Closes #9541
2015-02-03 21:36:05 +01:00
Adrien Grand 6cdde31e64 Search: Reuse Lucene's MultiCollector.
We could reuse Lucene's MultiCollector instead of implementing our own.

Close #9549
2015-02-03 18:12:15 +01:00
Adrien Grand 13b64cc362 Aggs: Make the nested aggregation call sub aggregators with doc IDs in order.
Close #9547
2015-02-03 16:51:36 +01:00
javanna ebb7ecb00e [TEST] RestClient to use a non static pooling connection manager
When closing an instance of RestClient, the connection manager gets shutdown, which makes it not usable anymore. If that is static, like it is now, no RestClient will work anymore from that moment on. Each instance of RestClient should have its own instance of connection manager
2015-02-03 16:46:54 +01:00
Adrien Grand 8540a863aa Search: Avoid calling DocIdSets.toSafeBits.
This method is heavy as it builds a bitset out of a DocIdSet in order to be
able to provide random-access. Now that Lucene has removed out-of-order scoring
true random-access is very rarely needed and we could instead return an Bits
instance that wraps the iterator. Ideally, we would use the DISI API directly
but I have to admit that the Bits API is more friendly.

Close #9546
2015-02-03 16:16:19 +01:00
javanna e5b174ff77 [TEST] Move SimpleNettyTransportTests to expected exception
Replaced try catch with expected exception, since no additional check was done on the exception thrown.
2015-02-03 15:51:51 +01:00
javanna 338766fd4d [TEST] Remove needless ClusterScope annotation from NettyTransportMultiPortTests
NettyTransportMultiPortTests is not an integration test, it doesn't rely on the test cluster thus the ClusterScope annotation doesn't have any effect.
2015-02-03 15:51:44 +01:00
javanna 0e67dda15d [TEST] Make sure that match assertion throws error if run against an object
We had a REST test that relied on matching a json response against a regex. It worked but the match wasn't done against the actual json object, but its java map representation converted into a string by calling `toString`. Since all other clients test runners don't work in this case, as they try to match a json object against a regex, we should do the same and prevent it from working.
2015-02-03 10:18:18 +01:00
javanna dfe67da013 [TEST] support stashed values within property names in our REST tests
Closes #9533
2015-02-03 10:17:50 +01:00
Boaz Leskes 4342237acf Test: reduce load in RecoveryWhileUnderLoadTests 2015-02-03 09:32:42 +01:00
Robert Muir 027730006b core: add 'checksum' option for index.shard.check_on_startup
The current "checkindex" on startup is very very expensive. This is
like running one of the old school hard drive diagnostic checkers and
usually not a good idea.

But we can do a CRC32 verification of files. We don't even need to
open an indexreader to do this, its much more lightweight.

This option (as well as the existing true/false) are randomized in
tests to find problems.

Also fix bug where use of the current option would always leak
an indexwriter lock.

Closes #9183
2015-02-03 00:10:08 -05:00
Ryan Ernst 6079d88d43 Mappings: Remove type prefix support from field names in queries
This is the first part of #8872.
2015-02-02 13:10:56 -08:00
Lee Hinman 0f405e9710 Merge branch 'pr/8795' 2015-02-02 11:49:45 -07:00
Michael McCandless e29cf903c8 Core: upgrade to Lucene snapshot r1656366
* IndexWriter deadlock and DV update concurrency fix
  * BytesRef reuse bug with SortedSetDVTermsEnum
  * Int overflow skip data corruption bug
  * Compound file API cleanups
  * IndexWriter doesn't accept per-doc Analyzer anymore

Closes #9524
2015-02-02 13:37:45 -05:00
Christoph Büscher 44193e7ba5 Aggregations: Add 'offset' option to histogram aggregation
Histogram aggregation supports an 'offset' option to move bucket boundaries.
In a histogram with buckets of size X these can be moved from 0, X, 2X, 3X,...
by an offset value of Y to Y, X+Y, 2X+Y, 3X+Y... by using the 'offset' option.
The previous 'pre_offset' and 'post_offset' options are removed in favour of
the simplified 'offset' option.

Closes #9417
Closes #9505
2015-02-02 18:23:01 +01:00
Lee Hinman 6c27f1242a Update Groovy dependency to 2.4.0 2015-02-02 09:27:41 -07:00
Clinton Gormley 988f35a7da REST: Add skip "stash_in_path" feature to nodes.info/20_transport test
Required for clients that don't yet do stash lookups when resolving
fieldnames like "nodes.$master.transport"
2015-02-02 17:11:04 +01:00
Clinton Gormley e7ac5f296e REST-spec: Allow stashed values to be used in property names as well
Fix the nodes.info/20_transport test to use the master node, rather
than to rely on applying a regex to the whole $body
2015-02-02 16:12:41 +01:00
Alexander Reelsen a55476bf70 Tests: Ensure no use of potentially resolving internal ips 2015-02-02 09:45:42 +01:00
Boaz Leskes 79c8621a47 Test: add trace logging to testNodeFailuresAreProcessedOnce 2015-02-02 09:32:53 +01:00
Alexander Reelsen 59f8c0951a Netty Transport: Add profiles to transport infos
Until now, there was no possibility to expose infos about configured
transport profiles. This commit adds the ability to expose those
information in the TransportInfo class.

The channel was well as the netty pipeline handler now also contain
the profile they were configured for, as this information cannot be
extracted elsewhere.

In addition, each profile now can set its own publish host and port,
which might be needed in case of portforwarding or using docker.

Closes #9134
2015-02-02 08:17:55 +01:00
Martijn van Groningen 3ce05b6919 inner hits: Fix bug that resolves parent docs properly as inner hit when inner hit is defined on has_parent query. 2015-02-01 22:29:21 +01:00
Martijn van Groningen d038f372d4 cleanup: Move catching of IOException higher op the stack to reduce the number of try-catch clauses. 2015-02-01 22:27:00 +01:00
Lee Hinman 25f944009c Remove unneeded null checks from IndicesClusterStateService 2015-02-01 12:13:57 -07:00
Simon Willnauer 42bb5deca2 Revert "[ENGINE] Fail engine if Lucene commit fails"
This reverts commit dda7242848.
2015-01-31 23:48:34 +01:00
Simon Willnauer dda7242848 [ENGINE] Fail engine if Lucene commit fails
This is similar to refresh, if we fail to commit the data we have to fail the
engine since in-ram data is likely discarded. Yet, it's still in translog and might
be recoverable when the node is restarted but we have to treat the engine as failed.
2015-01-31 16:45:38 +01:00