Commit Graph

18625 Commits

Author SHA1 Message Date
Christoph Büscher 57c579e7b7 Geo: Add validation of shapes to shape builders
So far the validation of geo shapes was only taking place in the
parse methods in ShapeBuilder. With the recent refactoring we no
longer can rely on shapes being parsed from json, so the same kind
of validation should take place when just using the java api.

A lot of validation concerns the number of points a shape needs to
have in order to be valid. Since this is not possible with current
builders where points can be added one by one, the builder constructors
are changed to require the mandatory parameters and validate those
already at construction time. To help with constructing longer lists
of points, a new utility PointsListBuilder is instroduces which can
produce list of coordinates accepted by most of the other shape builder
constructors.

Also adding tests for invalid shape exceptions to the already existing
shape builder tests.
2016-01-11 19:05:27 +01:00
Nik Everett d8af49eb91 Revert "Fix blended terms for non-strings"
This reverts commit 6bb01984b6.

It caused test failures.
2016-01-11 10:05:48 -05:00
Alexander Reelsen 5bd4582824 Release script: Ensure push to the right region with latest rpm-s3 2016-01-11 14:44:28 +01:00
Nik Everett c2259a2edd Merge pull request #15869 from nik9000/cross_fields_numeric
Fix blended terms for non-strings
2016-01-11 08:19:14 -05:00
Martijn van Groningen ace1b33c3c test: simplify percolator recovery test by only testing what is needed
Running requests via the percolate or mpercolate api is irrelevant.
What is relevant is that when nodes come back that they report the expected number of matches.
2016-01-11 13:38:50 +01:00
Simon Willnauer 55b0eced04 Merge pull request #15882 from s1monw/issues/13278
Check lenient_expand_open after aliases have been resolved
2016-01-11 13:31:45 +01:00
Simon Willnauer d32d16f117 Check lenient_expand_open after aliases have been resolved
We fail today with ClusterBlockExceptions if an alias expands to a closed index
during search since we miss to check the index option down the road after we expanded
aliases.

Closes #13278
2016-01-11 13:31:14 +01:00
David Pilato 39bc001e33 Merge pull request #15879 from elastic/docs/hdfs
Change link for HDFS support to plugins docs
2016-01-11 10:20:20 +01:00
David Pilato bc181c0310 Fix s3 with hdfs 2016-01-11 09:56:17 +01:00
Clinton Gormley 1d337a1178 Merge pull request #15859 from paulmallet/patch-1
Update aliases.asciidoc
2016-01-11 09:51:15 +01:00
David Pilato c514b26c8b Change link for HDFS support to plugins docs
I came to this change when I read https://github.com/elastic/elasticsearch/pull/15591

HDFS plugin link has not been updated when we moved HDFS to elasticsearch repository (#15192).
2016-01-11 09:43:00 +01:00
Adrien Grand 77dbfbc988 Merge pull request #15864 from jpountz/fix/initial_sizing_of_BytesStreamOutput
Fix initial sizing of BytesStreamOutput.
2016-01-11 09:15:09 +01:00
Clinton Gormley 1cf48b08fb Merge pull request #15534 from jmluy/patch-2
Fix minor typos in inner hits document
2016-01-10 21:52:31 +01:00
Simon Willnauer 6fcb45de60 Merge pull request #15877 from s1monw/make_indexing_memory_controller_private
Make IndexingMemoryController private to IndicesService
2016-01-10 21:33:41 +01:00
Simon Willnauer 2f5e2c09c8 add @Override annotation 2016-01-10 21:09:26 +01:00
Simon Willnauer 91e8d156f5 Make IndexingMemoryController private to IndicesService
This commit detaches the IndexingMemoryController from guice and moves
it's creation and closing into IndicesService where it logically belongs.
2016-01-10 20:51:31 +01:00
Simon Willnauer 37f6b5ced7 Merge pull request #15875 from s1monw/cleanup_indexing_operation_listeners
Cleanup IndexingOperationListeners infrastructure
2016-01-10 20:22:42 +01:00
Simon Willnauer 80ef201514 Remove dead code and add missing @Override annotations 2016-01-10 20:04:25 +01:00
Jason Tedor 7873dddab6 Merge pull request #15874 from jasontedor/index-writer-is-locked-be-gone
Remove and forbid use of IndexWriter#isLocked

Closes #15846
2016-01-10 08:32:41 -05:00
Jason Tedor abaf816d00 Remove and forbid use of IndexWriter#isLocked
This commit removes and now forbids use of
org.apache.lucene.index.IndexWriter#isLocked as this method was
deprecated in LUCENE-6508. The deprecation is due to the fact that
checking if a lock is held before acquiring that lock is subject to a
time-of-check-to-time-of-use race condition. There were three uses of
IndexWriter#isLocked in the code base:
 - a logging statement in o.e.i.e.InternalEngine where we are already in
   an exceptional condition that the lock was held; in this case,
   logging whether or not the directory is locked is superfluous
 - in o.e.c.l.u.VersionsTests where we were verifying that a write lock
   is released upon closing an IndexWriter; in this case, the check is
   not needed as successfully closing an IndexWriter releases its
   write lock
 - in o.e.t.s.MockFSDirectoryService where we were verifying that a
   directory is not write-locked before (implicitly) trying to obtain
   such a write lock in org.apache.lucene.index.CheckIndex#<init> (this
   is the exact type of a situation that is subject to a race
   condition); in this case we can proceed by just (implicitly) trying
   to obtain the write lock and failing if we encounter a
   LockObtainFailedException
2016-01-10 08:28:44 -05:00
Clinton Gormley 3c58a93a6e Merge pull request #15856 from marcbachmann/patch-1
Document index deletion using comma separated indices
2016-01-10 10:48:32 +01:00
Clinton Gormley 9773cca58e Merge pull request #15870 from rjruizes/patch-1
fix nested multi-value query
2016-01-10 10:06:40 +01:00
Simon Willnauer 54d1e35d84 Cleanup IndexingOperationListeners infrastructure
This commit reduces the former ShardIndexinService to a simple stats/metrics
class, moves IndexingSlowLog to the IndexService level since it can be shared
across shards of an index and is now hidden behind IndexingOperationListener.

IndexingOperationListener is now a first class citizen in IndexShard and is passed
in from IndexService.
2016-01-09 21:50:17 +01:00
Jason Tedor 37880040a2 Remove unused imports from o/e/i/e/InternalEngine.java 2016-01-09 12:16:09 -05:00
Simon Willnauer 2dbad1d65a Merge pull request #15841 from simonw/patch-1
Fixed broken link on from-size documentation page
2016-01-08 23:51:18 +01:00
Nik Everett 6bb01984b6 Fix blended terms for non-strings
It had some funky errors, like lenient:true not working and queries with
two integer fields blowing up if there was no analyzer defined on the
query. This throws a bunch more tests at it and rejiggers how non-strings
are handled so they don't wander off into scary QueryBuilder-land unless
they have a nice strong analyzer to protect them.

Closes #15860
2016-01-08 16:53:40 -05:00
Michael McCandless d3d41fc22b Merge pull request #15585 from mikemccand/max_indexing_thread_pool_size
Limit the max size of bulk and index thread pools to bounded number of processors
2016-01-08 14:36:21 -05:00
Adrien Grand 8568480a74 Fix initial sizing of BytesStreamOutput.
It currently tries to align to the page size (16KB) by default. However, this
might waste a significant memory (if many BytesStreamOutputs are allocated)
and is also useless given that BytesStreamOutput does not recycle (on the
contrary to ReleasableBytesStreamOutput). So the initial size has been changed
to 0.

Closes #15789
2016-01-08 20:08:31 +01:00
Jason Tedor 0b1a7fc2b8 Merge pull request #15862 from jasontedor/thread-local-random-be-gone
Remove and forbid use of j.u.c.ThreadLocalRandom

Closes #15294
2016-01-08 12:59:59 -05:00
Jason Tedor 871d1b4885 Remove and forbid use of j.u.c.ThreadLocalRandom
This commit removes and now forbids all uses of
java.util.concurrent.ThreadLocalRandom across the codebase. The
underlying issue with ThreadLocalRandom is that it can not be
seeded. This means that if ThreadLocalRandom is used in production code,
then tests that cover any code path containing ThreadLocalRandom will be
prevented from being reproducible by use of ThreadLocalRandom. Instead,
using org.elasticsearch.common.random.Randomness#get will give
reproducible sources of random when running under tests and otherwise
still give an instance of ThreadLocalRandom when running as production
code.
2016-01-08 12:23:48 -05:00
Jason Tedor 349352c85a Merge pull request #15861 from jasontedor/unboxed-math-utils-is-dead
Remove dead o.e.c.m.UnboxedMathUtils
2016-01-08 12:23:28 -05:00
Jason Tedor 21f5b0ff35 Remove dead o.e.c.m.UnboxedMathUtils
This commit removes the dead UnboxedMathUtils from the codebase.
2016-01-08 11:58:39 -05:00
Simon Willnauer 71796e2319 [TEST] Close failable translog in a controlled way otherwise assertions are off in the test 2016-01-08 13:10:09 +01:00
Adrien Grand 581fd49dac Merge pull request #15836 from jpountz/fix/bitset_cache_duplicates
BitSetFilterCache duplicates its content.
2016-01-08 09:59:28 +01:00
Igor Motov 8fbb3686cd Improve stability of the testBatchingShardUpdateTask test
On slow machines when this test randomly picks a large number of shards it can occasionally take more than 32.5 seconds to snapshot all shards. That is causing the test to miss the second to last assert in awaitsBusy at 32.5 seconds and then timeout in BlockingClusterStateListener at 60 seconds. Due to the timeout, the pending task queue is cleaned before the last awaitsBusy assert at 65 seconds and as a result the last assert runs on a completely empty queue and fails with a very confusing assert error.

This commit makes the timeout in BlockingClusterStateListener to occur after the last assert in assertBusyPendingTasks and therefore allows assertBusyPendingTasks to perform the last assert before cleaning the pending tasks queue takes place.

 This commit also reduces the maximum number of shards used in the test to 10 in order to speed up this test.
2016-01-07 19:33:50 -05:00
Adrien Grand 3ef9ec25f8 BitSetFilterCache duplicates its content.
We have a bug that makes all per-index bitset caches store bitsets for all
indices. In the case that you have many indices, which is fairly common with
time-based data, this could translate to a lot of wasted memory.

Closes #15820
2016-01-07 18:50:14 +01:00
Jason Tedor dcd8a8207f Merge pull request #15831 from jasontedor/global-search-timeout-docs
Add documentation for global search timeout

Relates #12211
2016-01-07 11:09:41 -05:00
Nik Everett 42cb2a5f02 Merge pull request #15811 from nik9000/def_cleanup
Cleanups for Def
2016-01-07 11:03:01 -05:00
Britta Weber bc5a6be0e3 Merge pull request #15832 from brwe/sync-translog-to-disk-after-recovery
sync translog to disk after recovery from primary
2016-01-07 16:54:56 +01:00
Jason Tedor 6243d375eb Add documentation for global search timeout
This commit adds documentation for the global search timeout setting
“search.default_search_timeout”.
2016-01-07 10:42:18 -05:00
Britta Weber f93b4cb215 sync translog to disk after recovery from primary
Otherwise if that node is shutdown and restarted it might will have lost all operations
that were in the translog.
2016-01-07 16:27:40 +01:00
Adrien Grand 8bd54dbf5a Merge pull request #15828 from jpountz/enhancement/stricter_metadata_parsing
Make MetaData parsing less lenient.
2016-01-07 15:20:51 +01:00
Adrien Grand 6ce7a972bc Make MetaData parsing less lenient.
Today this simply ignores everything that is not recognized.
2016-01-07 15:20:16 +01:00
Nik Everett 52f28888d5 Merge pull request #15813 from nik9000/xlint1
Remove Xlint:-override,-fallthrough,-static
2016-01-07 08:34:40 -05:00
Nik Everett 439832d0b3 Merge pull request #15815 from nik9000/xlint2
Remove a few more Xlint skips
2016-01-07 08:34:28 -05:00
Boaz Leskes d5e6eb58a8 Log uncaught exceptions from scheduled once tasks
`ScheduledThreadPoolExecutor` allows you to schedule tasks to run once or periodically at the future. If such a task throws an exception, that exception is caught and reported in the future that `ScheduledThreadPoolExecutor#schedule` returns. However, we typically do not capture the future / do not test it for errors. This results in exception being swallowed and not reported. To mitigate this we now wrap any command in a LoggingRunnable  (already used for periodic tasks).  Also, RunnableCommand is changed not to swallow exception but percolate them further for reporting by the future.

Closes #15824
2016-01-07 14:04:35 +01:00
Simon Willnauer e7f9d685f1 [TEST] Test that translog can recover after random IOException
This commit adds a new test that can throw an IOException at any point in time
and ensures that all previously synced documents can be successfully recovered after hitting
an excepiton.

Relates to #15788
2016-01-07 10:17:31 +01:00
Adrien Grand 132df10342 Merge pull request #15614 from jpountz/remove/warmers
Remove query warmers and the warmer API.
2016-01-07 09:59:14 +01:00
Adrien Grand 67d233cecd Remove warmers and the warmer API.
Warmers are now barely useful and will be removed in 3.0. Note that this only
removes the warmer API and query-based warmers. We still have warmers internally
for eg. global ordinals.

Close #15607
2016-01-07 09:57:07 +01:00
Martijn van Groningen 604d59a95e muted test 2016-01-07 09:54:59 +01:00