Commit Graph

2768 Commits

Author SHA1 Message Date
Christoph Büscher 31f90c91af Making LineStringBuilder and MultiLineStringBuilder writable and add equals/hashCode 2015-12-17 18:20:32 +01:00
Christoph Büscher 315b0c263d Geo: Make rest of ShapeBuilders implement Writable
This is the second part of making ShapeBuilders implement Writable.

This PR add serialization, equality and hashCode to all remaining
ShapeBuilders that don't implement it yet.
2015-12-17 18:20:32 +01:00
Adrien Grand 4afc4f3dc0 Merge pull request #15511 from jpountz/fix/simplify_Text
Simplify the Text API.
2015-12-17 18:07:39 +01:00
Adrien Grand 76abf43f7f Merge pull request #15508 from jpountz/fix/MetaDataMappingService
MetaDataMappingService should call MapperService.merge with the original mapping update.
2015-12-17 18:04:46 +01:00
Britta Weber 51fc09b264 Temporarily deactivate spuriously failing test 2015-12-17 17:57:55 +01:00
Adrien Grand 6ea16671f4 Simplify the Text API.
We have the Text API, which is essentially a wrapper around a String and a
BytesReference and then we have 3 implementations depending on whether the
String view should be cached, the BytesReference view should be cached, or both
should be cached.

This commit merges everything into a single Text that is essentially the old
StringAndBytesText impl.

Long term we should look into whether this API has any performance benefit or
if we could just use plain strings. This would greatly simplify all our other
APIs that currently use Text.
2015-12-17 17:22:38 +01:00
Adrien Grand 1e0f776af3 Merge pull request #15516 from jpountz/fix/highlighter_extract
Fix spans extraction to not also include individual terms.
2015-12-17 17:12:18 +01:00
Adrien Grand 517fc113fe Fix spans extraction to not also include individual terms.
This is a bug that I introduced in #13239 while thinking that the differences
were due to changes in Lucene: extractUnknownQuery is also called when span
extraction already succeeded, so we should only fall back to Weight.extractTerms
if no spans have been extracted yet.

Close #15291
2015-12-17 17:01:29 +01:00
Michael McCandless 086ea53a3e Merge pull request #15506 from mikemccand/all_term_query_state
AllTermQuery's scorer should skip segments that never saw the requested term
2015-12-17 11:01:11 -05:00
Daniel Mitterdorfer 9dfc9397d4 Temporarily deactivate spuriously failing test 2015-12-17 16:59:05 +01:00
Daniel Mitterdorfer c3009cf615 Merge remote-tracking branch 'danielmitterdorfer/exp-backoff-as-default-for-bulk' 2015-12-17 16:52:07 +01:00
Daniel Mitterdorfer 91eed30a14 BulkProcessor backs off exponentially by default
With this commit we change the default behavior of
BulkProcessor from not backing off when getting
EsRejectedExecutionException to backing off exponentially.
2015-12-17 16:47:21 +01:00
Yannick Welsch 8f14b10863 Merge pull request #15281 from ywelsch/feature/alloc-ids-primary
Allocate primary shards based on allocation IDs
2015-12-17 15:59:29 +01:00
Yannick Welsch 3a442db9bd Allocate primary shards based on allocation ids
Closes #15281
2015-12-17 15:55:50 +01:00
Boaz Leskes b71845bf9b Remove the unused mergeScheduleFuture from IndexShard.
Closes #15512
2015-12-17 15:43:27 +01:00
Daniel Mitterdorfer 3f87b0809e Fix visibility issue in RetryTests 2015-12-17 15:23:40 +01:00
Jason Tedor 9149630749 Reroute once per batch of shard failures
This commit modifies the behavior after publication of a new cluster
state to only invoke the reroute logic once per batch of shard failures
rather than once per shard failure.
2015-12-17 08:47:05 -05:00
Jason Tedor 1bc196c387 Merge pull request #15494 from jasontedor/cluster-state-published-callback
Add callback for publication of new cluster state
2015-12-17 08:31:02 -05:00
Daniel Mitterdorfer 207ccc3cd6 Add missing header in RetryTests 2015-12-17 14:30:31 +01:00
Daniel Mitterdorfer b2b7b30d10 BulkProcessor retries after request handling has been rejected due to a full thread pool
With this commit we introduce limited retries with a backoff logic to BulkProcessor
when a bulk request has been rejeced with an EsRejectedExecutionException.

Fixes #14620.
2015-12-17 14:05:00 +01:00
Adrien Grand 86d6e28b7f MetaDataMappingService should call MapperService.merge with the original mapping update.
Currently MetaDataMappingService parses the mapping updates, reserializes it and
finally calls MapperService.merge with the serialized mapping. Given that mapping
serialization only writes differences from the default, this is a bit unfair to
parsers since they can't know whether some option has been explicitly set or not.

Furthermore this can cause bugs with metadata fields given that these fields use
existing field types as defaults.

This commit changes MetaDataMappingService to call MapperService.merge with the
original mapping update.
2015-12-17 13:09:15 +01:00
Michael McCandless c1d8d3b28b AllTermQuery's scorer should skip segments that never saw the requested term 2015-12-17 05:26:54 -05:00
Adrien Grand 6ccc759691 Merge pull request #15480 from jpountz/fix/mapping_explicit_defaults
Make mapping serialization more robust.
2015-12-17 11:23:27 +01:00
Robert Muir a7cc91e868 Merge pull request #15501 from rmuir/sheisty_classes
thirdPartyAudit round 2
2015-12-17 03:44:27 -05:00
Robert Muir 6692e42d9a thirdPartyAudit round 2
This fixes the `lenient` parameter to be `missingClasses`. I will remove this boolean and we can handle them via the normal whitelist.
It also adds a check for sheisty classes (jar hell with the jdk).
This is inspired by the lucene "sheisty" classes check, but it has false positives. This check is more evil, it validates every class file against the extension classloader as a resource, to see if it exists there. If so: jar hell.

This jar hell is a problem for several reasons:

1. causes insanely-hard-to-debug problems (like bugs in forbidden-apis)
2. hides problems (like internal api access)
3. the code you think is executing, is not really executing
4. security permissions are not what you think they are
5. brings in unnecessary dependencies
6. its jar hell

The more difficult problems are stuff like jython, where these classes are simply 'uberjared' directly in, so you cant just fix them by removing a bogus dependency. And there is a legit reason for them to do that, they want to support java 1.4.
2015-12-17 02:35:00 -05:00
Jack Conradson 4523eaec88 Added plumbing for compile time script parameters.
Closes #15464
2015-12-16 18:29:21 -08:00
Ryan Ernst a1312a5350 Merge pull request #15495 from rjernst/disable_mock_plugins
Allow integ tests to exclude mock plugins
2015-12-16 18:22:04 -08:00
Ryan Ernst 17a806631d Test: Allow integ tests to exclude mock plugins
We currently randomly add a set of mock plugins to integ tests.
Sometimes it is necessary to omit this mock plugins, but other times you
may just want to suppress a particular mock plugin. For example, if you
have your own transport, you want to omit the asserting local transport
mock, since they would both try to set the transport.type.
2015-12-16 17:59:43 -08:00
Robert Muir 4f9d4103f2 Merge pull request #15491 from rmuir/forbidden_third_party
Add gradle thirdPartyAudit to precommit tasks
2015-12-16 18:56:50 -05:00
Robert Muir 42138007db add some more comments about internal api usage 2015-12-16 18:56:02 -05:00
Jason Tedor 7e14245c69 Add callback for publication of new cluster state
This commit adds a callback for a cluster state task executor that will
be invoked if the execution of a batch of cluster state update tasks
led to a new cluster state and that new cluster state was successfully
published.

Closes #15482
2015-12-16 18:43:31 -05:00
Michael McCandless 207f0a4eda use async translog for this test 2015-12-16 17:53:55 -05:00
Jason Tedor 12e241ff1a Ensure compressed oops flag is written as a string 2015-12-16 17:29:08 -05:00
Jason Tedor cfc46da18e Merge pull request #15489 from jasontedor/compressed-oops
Info on compressed ordinary object pointers
2015-12-16 17:00:14 -05:00
Jason Tedor 9aa41d092e Info on compressed ordinary object pointers
This commit adds to JvmInfo the status of whether or not compressed
ordinary object pointers are enabled. Additionally, logging of the max
heap size and the status of the compressed ordinary object pointers flag
are provided on startup.

Relates #13187, relates elastic/elasticsearch-definitive-guide#455
2015-12-16 16:59:41 -05:00
Robert Muir ee79d46583 Add gradle thirdPartyAudit to precommit tasks 2015-12-16 16:38:16 -05:00
Ryan Ernst a2b8f4b90a Merge pull request #15434 from rjernst/http_type
Expose http.type setting, and collapse al(most all) modules relating to transport/http
2015-12-16 11:54:30 -08:00
Jason Tedor 709740efd2 Merge pull request #14993 from jasontedor/tribe-node-cluster-state-batch
Tribe nodes should apply cluster state updates in batches
2015-12-16 12:10:10 -05:00
Jason Tedor 53b3cd83a5 Tribe nodes should apply cluster state updates in batches
This commit applies the general mechanism for applying cluster state
updates in batches to tribe nodes.

Relates #14899, relates #14725
2015-12-16 12:08:27 -05:00
Yannick Welsch 6b49d728ec Merge pull request #15476 from ywelsch/fix/script-service-tests
[TEST] Fix ScriptServiceTests.testFineGrainedSettings that can loop indefinitely
2015-12-16 18:05:55 +01:00
Yannick Welsch 88a0104687 [TEST] ScriptServiceTests only test single ScriptEngineService 2015-12-16 17:36:14 +01:00
Britta Weber db357f078a Merge pull request #15396 from brwe/java-api-for-synced-flush
Add java API for synced flush

closes #12812
2015-12-16 17:18:18 +01:00
javanna 99f9bd7cfe Throw exception when trying to write map with null keys
Closes #14346
2015-12-16 17:01:04 +01:00
Jason Tedor 89c960b00a Merge pull request #15428 from jasontedor/cluster-state-batch-logging
Explicitly log cluster state update failures
2015-12-16 10:55:14 -05:00
Jason Tedor 02354fc491 More useful assertions in o.e.c.s.InternalClusterService 2015-12-16 10:53:59 -05:00
Jason Tedor 89a09b9bed Master should wait on cluster state publication when failing a shard
When a client sends a request to fail a shard to the master, the current
behavior is that the master will submit the cluster state update task
and then immediately send a successful response back to the client;
additionally, if there are any failures while processing the cluster
state update task to fail the shard, then the client will never be
notified of these failures.

This commit modifies the master behavior when handling requests to fail
a shard. In particular, the master will now wait until successful
publication of the cluster state update before notifying the request
client that the shard is marked as failed; additionally, the client is
now notified of any failures during the execution of the cluster state
update task.

Relates #14252
2015-12-16 10:37:51 -05:00
Adrien Grand 8ac8c1f547 Make mapping serialization more robust.
When creating a metadata mapper for a new type, we reuse an existing
configuration from an existing type (if any) in order to avoid introducing
conflicts. However this field type that is provided is considered as both an
initial configuration and the default configuration. So at serialization time,
we might only serialize the difference between the current configuration and
this default configuration, which might be different to what is actually
considered the default configuration.

This does not cause bugs today because metadata mappers usually override the
toXContent method and compare the current field type with Defaults.FIELD_TYPE
instead of defaultFieldType() but I would still like to do this change to
avoid future bugs.
2015-12-16 16:08:45 +01:00
Jason Tedor 44467df353 Merge pull request #15456 from jasontedor/reorganize-shard-state-action
Reorganize o/e/c/a/s/ShardStateAction.java
2015-12-16 07:37:10 -05:00
Simon Willnauer e83c728265 Merge pull request #15475 from s1monw/beef_up_translog_tests
Beef up TranslogTests with concurrent fatal exceptions test
2015-12-16 12:43:56 +01:00
Simon Willnauer e5dc124811 apply review from @bleskes 2015-12-16 12:27:07 +01:00