Commit Graph

18625 Commits

Author SHA1 Message Date
Simon Willnauer e8daad66d1 apply more feedback from @dakrone 2015-12-28 12:52:38 +01:00
Simon Willnauer a20b07d581 Merge branch 'master' into trash_recovery_threads 2015-12-28 12:45:14 +01:00
Simon Willnauer 0a816cd343 Add tests for equals and hashCode and fix FiltersFunctionScoreQuery equals and hashCode impls
Relates to #15676
2015-12-28 12:34:34 +01:00
Adrien Grand baaeb0f578 Merge pull request #15664 from jpountz/remove/ParseContext_ignoredValue
Remove ParseContext.ignoredValue.
2015-12-28 12:05:26 +01:00
Adrien Grand 23f736a0c1 Remove ParseContext.ignoredValue.
This API is unused.
2015-12-24 15:28:09 +01:00
socurites 485915bbe7 comma(,) was duplicated
deleted it.
2015-12-24 14:31:26 +01:00
socurites 25d23091e2 Edge NGram: "side" setting was depercated
Edge NGram: "side" setting was depercated
2015-12-24 14:26:24 +01:00
Adrien Grand af122f4151 Remove mapping backward compatibilit with pre-2.0.
This removes the backward compatibility layer with pre-2.0 indices, notably
the extraction of _id, _routing or _timestamp from the source document when a
path is defined.
2015-12-24 13:47:37 +01:00
Adrien Grand e2fbdcfb4f Merge pull request #15633 from jpountz/fix/dynamic_mappings
Improve cross-type dynamic mapping updates.
2015-12-24 10:24:08 +01:00
Adrien Grand 3015eb3088 Improve cross-type dynamic mapping updates.
Today when dynamically mapping a field that is already defined in another type,
we use the regular dynamic mapping logic and try to copy some settings to avoid
introducing conflicts. However this is quite fragile as we don't deal with every
existing setting. This proposes a different approach that will just reuse the
shared field type.

Close #15568
2015-12-24 10:22:35 +01:00
Adrien Grand 79b14215aa Merge pull request #15636 from jpountz/feature/bool_fields
Add sub-fields support to `bool` fields.
2015-12-24 10:21:49 +01:00
Robert Muir d144ba24a5 Merge pull request #15588 from rmuir/hdfs2-only
merge current hdfs improvements to master
2015-12-23 18:17:22 -05:00
Robert Muir f14a21639c add cleanups from simon 2015-12-23 18:15:33 -05:00
Jason Tedor 6ab922c5a0 Reduce runtime of CidrsTests#testValidCombinations
This commit reduces the running time of CidrsTests#testValidCombinations
by hoisting some costly repeated operations outside of the inner test
loop.
2015-12-23 18:02:41 -05:00
Adrien Grand f40b72633b Add sub-fields support to `bool` fields.
`bool` is our only core mapper that does not support sub fields.

Close #6587
2015-12-23 17:45:46 +01:00
Adrien Grand 76fa9023b6 Merge pull request #15488 from jpountz/remove/index_name_back_compat
Remove `index_name` back compat.
2015-12-23 14:55:41 +01:00
Adrien Grand d8d8666877 Remove `index_name` back compat.
Since 2.0 we enforce that fields have the same full and index names. So in 3.x
we can remove the ability to have different names on the same field.
2015-12-23 14:55:26 +01:00
Adrien Grand b771daa3c7 Merge pull request #15602 from jpountz/enhancement/function_score_two_phase
FunctionScoreQuery should implement two-phase iteration.
2015-12-23 14:54:23 +01:00
Alexander Reelsen 1e2919b03d Smoke Tester: Install mapper attachment & repository hdfs plugin 2015-12-23 13:26:23 +01:00
Alexander Reelsen a0b946ccab Smoke Tester: Dont install groovy/expression plugins
Those two plugins are modules now and thus dont need to be installed
explicitely when testing.
2015-12-23 13:15:56 +01:00
Adrien Grand 07658f58a8 FunctionScoreQuery should implement two-phase iteration.
FunctionScoreQuery should do two things that it doesn't do today:
 - propagate the two-phase iterator from the wrapped scorer so that things are
   still executed efficiently eg. if a phrase or geo-distance query is wrapped
 - filter out docs that don't have a high enough score using two-phase
   iteration: this way the score is only checked when everything else matches

While doing these changes, I noticed that minScore was ignored when scores were
not needed and that explain did not take it into account, so I fixed these
issues as well.
2015-12-23 12:02:21 +01:00
Alexander Reelsen 9cd618244a Docs: Remove deprecated documentation flag in profile docs 2015-12-23 10:59:38 +01:00
Adrien Grand 56d2dd701e Fix SizeMappingTests failure. 2015-12-23 10:48:00 +01:00
Adrien Grand a2072fe927 Merge pull request #15539 from jpountz/fix/immutable_document_mapper
Make mapping updates more robust.
2015-12-23 09:55:42 +01:00
Adrien Grand f535c27024 Make mapping updates more robust.
This changes a couple of things:

Mappings are truly immutable. Before, each field mapper stored a
MappedFieldTypeReference that was shared across fields that have the same name
across types. This means that a mapping update could have the side-effect of
changing the field type in other types when updateAllTypes is true. This works
differently now: after a mapping update, a new copy of the mappings is created
in such a way that fields across different types have the same MappedFieldType.
See the new Mapper.updateFieldType API which replaces MappedFieldTypeReference.

DocumentMapper is now immutable and MapperService.merge has been refactored in
such a way that if an exception is thrown while eg. lookup structures are being
updated, then the whole mapping update will be aborted. As a consequence,
FieldTypeLookup's checkCompatibility has been folded into copyAndAddAll.

Synchronization was simplified: given that mappings are truly immutable, we
don't need the read/write lock so that no documents can be parsed while a
mapping update is being processed. Document parsing is not performed under a
lock anymore, and mapping merging uses a simple synchronized block.
2015-12-23 09:55:07 +01:00
Lee Hinman 862cdad8dc Merge remote-tracking branch 'dakrone/freebsd-test-fix' 2015-12-22 15:41:35 -07:00
Jason Tedor 4c9a9b4b2d Reduce number of threads in o.e.c.c.CacheTests
This commit reduces the randomized number of threads in the cache tests
to reduce the amount of time that the tests take to execute.
2015-12-22 16:55:55 -05:00
Lee Hinman 482843e27b Fix build to run correctly on FreeBSD
This adds the required changes/checks so that the build can run on
FreeBSD.

There are a few things that differ between FreeBSD and Linux:

- CPU probes return -1 for CPU usage
- `hot_threads` cannot be supported on FreeBSD

From OpenJDK's `os_bsd.cpp`:

```c++
bool os::is_thread_cpu_time_supported() {
  #ifdef __APPLE__
  return true;
  #else
  return false;
  #endif
}
```

So this API now returns (for each FreeBSD node):

```
curl -s localhost:9200/_nodes/hot_threads
::: {Devil Hunter Gabriel}{q8OJnKCcQS6EB9fygU4R4g}{127.0.0.1}{127.0.0.1:9300}
   hot_threads is not supported on FreeBSD
```

- multicast fails in native `join` method - known bug:
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193246

Which causes:

```
1> Caused by: java.net.SocketException: Invalid argument
1>    at java.net.PlainDatagramSocketImpl.join(Native Method)
1>    at java.net.AbstractPlainDatagramSocketImpl.join(AbstractPlainDatagramSocketImpl.java:179)
1>    at java.net.MulticastSocket.joinGroup(MulticastSocket.java:323)
1>    at org.elasticsearch.plugin.discovery.multicast.MulticastChannel$Plain.buildMulticastSocket(MulticastChannel.java:309)
```

So these tests are skipped on FreeBSD.

Resolves #15562
2015-12-22 12:36:04 -07:00
Robert Muir 7abd051734 better containing of hadoop for actual blobstore operations 2015-12-22 12:07:37 -05:00
Daniel Mitterdorfer f9a601c7da Make BulkProcessorRetryIT less sensitive
In this commit we increase the queue size of the bulk pool in
BulkProcessorRetryIT to make it less sensitive.

As this test case should stress the pool so bulk processor needs to
back off but not so much that the backoff policy will give up at
some point (which is a valid condition), we still keep it below the
default queue size of 50.
2015-12-22 17:37:30 +01:00
Yannick Welsch c91b0ed7b0 Merge pull request #15603 from ywelsch/fix/java-api-indexed-scripts
Fix Java API documentation for indexed scripts
2015-12-22 16:58:59 +01:00
Yannick Welsch 6d0114edb5 Fix Java API documentation for indexed scripts 2015-12-22 16:58:19 +01:00
Adrien Grand ef6d2f5ab3 Merge pull request #15605 from jpountz/fix/speedup_CodecTests
Speed up CodecTests.
2015-12-22 15:45:59 +01:00
Adrien Grand 6f3fc5d75d Speed up CodecTests.
Some tests, but in particular CodecTests, are slow because they test all
versions that ever existed even though they should only test supported
versions.
2015-12-22 15:16:08 +01:00
Simon Willnauer f5e4cd4616 Remove recovery threadpools and throttle outgoing recoveries on the master
Today we throttle recoveries only for incoming recoveries. Nodes that have a lot
of primaries can get overloaded due to too many recoveries. To still keep that at bay
we limit the number of threads that are sending files to the target to overcome this problem.

The right solution here is to also throttle the outgoing recoveries that are today unbounded on
the master and don't start the recovery until we have enough resources on both source and target nodes.

The concurrency aspects of the recovery source also added a lot of complexity and additional threadpools
that are hard to configure. This commit removes the concurrent streamns notion completely and sends files
in the thread that drives the recovery simplifying the recovery code considerably.
Outgoing recoveries are not throttled on the master via a allocation decider.
2015-12-22 14:59:43 +01:00
Simon Willnauer d353dcb138 Merge pull request #15592 from s1monw/remove_deprecated_query_cache_settings
Remove deprecated query cache settings
2015-12-22 10:34:00 +01:00
Simon Willnauer 00bff44899 Merge pull request #15594 from s1monw/remove_compound_on_flush
Remove `index.compound_on_flush` setting and default to `true`
2015-12-22 10:33:38 +01:00
kwangsik 70d38760e6 Put space into last comment line 2015-12-22 18:27:50 +09:00
Simon Willnauer 8135a4ac9f Remove `index.compound_on_flush` setting and default to `true`
We added this undocumented realtime setting as backup plan long ago
but to date we haven't had a situation where it was a problem. It's reducing
the number of filehandles in the NRT case dramatically and should always be enabled.
2015-12-22 09:56:26 +01:00
Simon Willnauer 3a5d3a3bb0 Remove deprecated query cache settings 2015-12-22 09:39:12 +01:00
Simon Willnauer 8c898048bc Merge pull request #15584 from s1monw/move_translog_syn_to_index_service
Move async translog sync logic into IndexService
2015-12-22 09:28:11 +01:00
Robert Muir 010d1a89c5 Merge branch 'master' into hdfs2-only 2015-12-22 00:40:54 -05:00
Robert Muir 91dcc9e073 tidy up 2015-12-22 00:28:53 -05:00
Robert Muir 9573bb9f15 make sure BlobStore.close always triggers ACE on any access afterwards 2015-12-22 00:21:03 -05:00
Robert Muir a04268e42e reorder checks 2015-12-21 23:52:16 -05:00
Robert Muir a587ba110c add some safety around repository 2015-12-21 23:48:22 -05:00
Ryan Ernst d104d6d652 Refactor hdfs unit tests to be simple and check every configuration
error condition
2015-12-21 19:38:54 -08:00
Jun Ohtani 51f6519e71 Analysis : Fix no response from Analyze API without specified index
fix test
2015-12-22 11:53:29 +09:00
Ryan Ernst af7d6b629c Change hdfs unit tests to be a single node test instead of integ test 2015-12-21 18:32:28 -08:00
Robert Muir c54d53c8d5 streamline these classes a bit 2015-12-21 21:11:06 -05:00