Commit Graph

4991 Commits

Author SHA1 Message Date
Jason Tedor 0b41580656 Remove unused import from ScalingThreadPoolTests 2016-04-29 16:21:59 -04:00
Jason Tedor c82e564886 Remove racy but unnecessary assertion
This commit removes a racy but unnecessary assertion in scaling thread
pool idle test. Namely, the main test thread can reach the removed
assertion before the last few threads in the thread pool have completed
their tasks and caused the completed tasks count on the underlying
executor to be updated. But this assertion is unnecessary. The main test
thread already waits on a latch that is only decremented immediately
before a task completes. This ensures that it was in fact the case that
every submitted task was executed.

Closes #18072
2016-04-29 16:21:22 -04:00
Christoph Büscher 262a814c8d Tests: Fix TermsQueryBuilderTests expectations when lookup returns no terms
When the termslookup (mocked in this case) doesn't return any terms, the
query used to rewrite to an empty boolean query. Now it rewrites to a
MatchNoDocsQuery. This changes the test expectation accordingly.

Closes #18071
2016-04-29 19:29:25 +02:00
Ali Beyad a31b94e237 When checking if an index tombstone can be applied, use both the index
name and uuid because the cluster state may contain an active index of
the same name (but different uuid).

Closes #18058
Closes #18054
2016-04-29 11:40:31 -04:00
Martijn van Groningen 7aca1389e2 ingest: Add `date_index_name` processor.
Closes #17814
2016-04-29 17:20:48 +02:00
Jason Tedor f349c4f135 Return null for "same" thread pool info
This commit modifes the EsThreadPoolTestCase#info helper method to
return null when info for the thread pool can not be found. This really
should only happen for the "same" thread pool, and so we also assert
that we only get to a place where there is no info if the thread pool
that info was requested for is in fact the "same" thread pool. Not
returning null here and instead throwing an exception would fail tests
that tried to lookup info on the "same" thread pool.
2016-04-29 10:29:02 -04:00
Martijn van Groningen 8c77399f1c test: changed test's expectation that a BooleanQuery is returned. A NoMatchDocsQuery is returned instead now. 2016-04-29 15:47:03 +02:00
David Pilato 2232a7cdf3 Merge branch 'pr/cat-size-time-units' 2016-04-29 15:09:14 +02:00
Jason Tedor c25f8ad912 Avoid sliced locked contention in internal engine
Today we use a sliced lock strategy for acquiring locks to prevent
concurrent updates to the same document. The number of sliced locks is
computed as a linear function of the number of logical
processors. Unfortunately, the probability of a collision against a
sliced lock is prone to the birthday problem and grows faster than
expected. In fact, the mathematics works out such that for a fixed
target probability of collision, the number of lock slices should grow
like the square of the number of logical processors. This is
less-than-ideal, and we can do better anyway. This commit introduces a
strategy for avoiding lock contention within the internal
engine. Ideally, we would only have lock contention if there were
concurrent updates to the same document. We can get close to this ideal
world by associating a lock with the ID of each document. This
association can be held in a concurrent hash map. Now, the JDK
ConcurrentHashMap also uses a sliced lock internally, but it has several
strategies for avoiding taking the locks and these locks are only held
for a very short period of time. This implementation associates a
reference count with the lock that is associated with a document ID and
automatically removes the document ID from the concurrent hash map when
the reference count reaches zero.

Relates #18060
2016-04-29 08:05:23 -04:00
Martijn van Groningen 6c3beaa2eb Drop top level inner hits in favour of inner hits defined in the query dsl.
Fix a limitation that prevent from hierarchical inner hits be defined in query dsl.

Removed the nested_path, parent_child_type and query options from inner hits dsl. These options are only set by ES
upon parsing the has_child, has_parent and nested queries are using their respective query builders.

These options are still used internally, when these options are set a new private copy is created based on the
provided InnerHitBuilder and configuring either nested_path or parent_child_type and the inner query of the query builder
being used.

Closes #11118
2016-04-29 11:17:24 +02:00
Jason Tedor 0cf1d16187 Fix line-length violation in SetProcessor
This commit addresses a checkstyle line-length violation in
SetProcessor.java.
2016-04-28 23:41:16 -04:00
Tal Levy 6302fb65a3 add ability to disable ability to override values of existing fields in set processor 2016-04-28 13:50:19 -07:00
Lee Hinman a0ba3c9a02 Merge remote-tracking branch 'dakrone/add-store-status-to-explain' 2016-04-28 13:47:55 -06:00
Lee Hinman cb29e041c4 Handle the case where `allocatedPostIndexCreate` is true 2016-04-28 13:46:06 -06:00
Jay Modi 34b5839487 Merge pull request #17949 from jaymode/list_setting_exists
fix exists method for list settings when using numbered setting format
2016-04-28 12:25:48 -04:00
Martijn van Groningen 22dc06fb7d removed duplicated code 2016-04-28 16:42:12 +02:00
Mathias Fußenegger a5ab648fae Handle indices=["_all"] when restoring a snapshot (#18025)
Setting indices=["_all"] when restoring a snapshot would throw an IndexNotFoundException instead of selecting all indices as in other APIs.
2016-04-28 14:10:01 +02:00
Isabel Drost-Fromm 7bcc079d60 Adjust wording according to review. 2016-04-28 12:39:16 +02:00
Isabel Drost-Fromm c34ba6fe1e Merge branch 'master' into enhancement/switch_boolean_to_match_no_docs_query 2016-04-28 12:35:43 +02:00
Adrien Grand de43bda3f3 iter 2016-04-28 09:39:08 +02:00
Adrien Grand b77893b1d1 Fail queries on not indexed fields.
While returning no hits on fields that are not mapped may be fine, it is not
for fields that are mapped but not indexed (`index:false`). We should fail the
query in that case rather than returning no hits.
2016-04-28 09:37:04 +02:00
Nik Everett 1df4efccd5 Wrap settings at 140 columns
and remove the checkstyle suppressions.
2016-04-27 18:18:20 -04:00
Nik Everett 6cccd4462c Wrap Version at 140 columns
and remove its checkstyle_suppression line
2016-04-27 17:25:37 -04:00
Nik Everett 47577613cb Wrap tasks code at 140 columns
Switch something from an explicit toString to Strings.toString which
is the same thing but with more code reuse.

Also renamed a constant to be CONSTANT_CASE.
2016-04-27 17:05:09 -04:00
Nik Everett 3468be0075 [test] Remove BulkProcessorRetryIT's generic threadpool setting
It wasn't required to excercise the retries and it caused stability issues.
2016-04-27 16:21:39 -04:00
Nik Everett d9afb8bfd6 [test] Wrap long lines in TasksIT 2016-04-27 15:32:56 -04:00
Nik Everett eb88fd1461 [test] TasksIT expected a request per copy
But instead the field stats API makes a request per primary.
2016-04-27 15:28:35 -04:00
Jim Ferenczi 9af2083765 Add XPointValues: forked utility methods from Lucene's PointValues until LUCENE-7257 is released.
Replace PointValues with XPointValues where needed.
Fixes #18010
2016-04-27 20:51:30 +02:00
Nik Everett 1feb9da3f2 ConstructingObjectParser is ObjectParser for ctors
ObjectParser makes parsing XContent 95% easier. No more nested loops.
No more forgetting to use ParseField. Consistent handling for arrays.
Awesome. But ObjectParser doesn't support building things objects whose
constructor arguments are mixed in with the rest of its properties.
Enter ConstructingObjectParser! ConstructingObjectParser queues up
fields until all of the constructor arguments have been parsed and
then sets them on the target object.

Closes #17352
2016-04-27 14:10:01 -04:00
Lee Hinman e636db1d7f Reorganize final decision, explanation, and store copy calculation, add tests 2016-04-27 10:43:08 -06:00
Jim Ferenczi 573c4f3ed1 Extend field stats:
* Add isSearchable and isAggregatable (collapsed to true if any of the instances of that field are searchable or aggregatable).
* Accept wildcards in field names.
* Add a section named conflicts for fields with the same name but with incompatible types (instead of throwing an exception).
2016-04-27 16:51:53 +02:00
Lee Hinman 1c0fc0a914 Use "_in_millis" for the suffix of delay times
Also change the javadoc to say "milliseconds" instead of "nanoseconds"
2016-04-27 08:35:33 -06:00
Nik Everett 4f9929d439 Javadoc: In Stream* scannability is priority 1! 2016-04-27 09:37:07 -04:00
Isabel Drost-Fromm 0e7f8316c0 Merge branch 'master' into enhancement/switch_boolean_to_match_no_docs_query 2016-04-27 15:17:54 +02:00
Isabel Drost-Fromm 6f8932a044 Switch to MatchNoDocsQuery with explicit reason string 2016-04-27 15:08:28 +02:00
Jason Tedor 0e824fab09 Fix test bug in scaling thread pool idle test
This commit fixes a test bug in the scaling thread pool idle
test. Namely, a random thread pool is chosen which could have a min pool
size of one or four but the while loop was acting as if the min pool
size was four (this is due to the test having been initially written for
only the generic thread pool).

Additionally, a latch is added between the test thread and the work
tasks to reduce the chance of a race condition between the test thread
and last few tasks.
2016-04-27 08:27:38 -04:00
Isabel Drost-Fromm 4c9070c52e Removing question concerning default no docs query. 2016-04-27 14:03:29 +02:00
Isabel Drost-Fromm 63eb81e7af Switches from empty boolean query to matchNoDocs
Closes #17981
2016-04-27 13:19:50 +02:00
Lee Hinman 93afac0776 Remove unneeded imports 2016-04-26 13:12:36 -06:00
Lee Hinman 2e447b960e Get tests working with the new redesign 2016-04-26 13:06:32 -06:00
Clinton Gormley 4a4e2dcace Updated the 2.3.2 bwc indices with those built from master 2016-04-26 21:03:38 +02:00
Lee Hinman 49c310691c Move remaining logic into Transport class
Also split NodeExplanation into its own class
2016-04-26 10:36:48 -06:00
Clinton Gormley 8a7dec2315 Added 2.3.2 and bwc indices for 2.3.2 2016-04-26 15:04:01 +02:00
Jason Tedor efeec4d096 Merge pull request #17017 from jasontedor/generic-thread-pool
Actually bound the generic thread pool
2016-04-26 08:27:48 -04:00
Jason Tedor b89a935be5 Expand scaling thread pool configuration coverage
This commit slightly expands the scaling thread pool configuration test
coverage. In particular, the test testScalingThreadPoolConfiguration is
expanded to include the case when min is equal to size, and the test
testDynamicThreadPoolSize is expanded to include all possible cases when
size is greater than or equal to min.
2016-04-26 08:17:54 -04:00
Jason Tedor e3126dfac0 Fix index name equality check in RoutingNodes
This commit fixes an index name equality check in RoutingNodes. Namely,
the check was comparing an instance of Index to an instance of
String. Instead, the index name should be obtained from the Index
instance to be compared to the instance of String.

Closes #17982
2016-04-26 07:45:30 -04:00
Jim Ferenczi 543b27f4cd Merge pull request #17780 from jimferenczi/match_nodocs_query
Add MatchNoDocsQuery, a query that matches no documents and prints the reason why in the toString method.
2016-04-26 12:20:12 +02:00
Alexander Reelsen f71eb0b888 Version: Set version to 5.0.0-alpha2 2016-04-26 09:30:26 +02:00
Adrien Grand 31a9845bc2 Remove the `SearchType` setter on `SearchContext`. #17955
It was not used.
2016-04-26 09:08:37 +02:00
Areek Zillur 4a1a03428d Add bwc support for pre-5.0 completion index
This commit adds support for reading and querying
completion fields that were indexed in 2.x
2016-04-25 21:21:56 -04:00