Commit Graph

22511 Commits

Author SHA1 Message Date
Uwe Schindler 04ab42cdf5 Use rethrow puzzler in the ClassValue 2016-06-15 18:36:45 +02:00
Uwe Schindler 6487940a79 Move type changes up to static part 2016-06-15 18:26:11 +02:00
Uwe Schindler a473298f44 Add megamorphic cache 2016-06-15 18:21:42 +02:00
Robert Muir b71f42a627 split MIC from PIC 2016-06-15 09:07:11 -04:00
Robert Muir 2b1ebc55a9 remove null guards from +, if not needed.
improve DefBootstrapTests
2016-06-14 23:52:21 -04:00
Robert Muir 5e4b2f2815 clean up compound assignment tests, fix shift bug 2016-06-14 20:40:16 -04:00
Robert Muir cd4f4594d6 fix perf bug with xor promotion 2016-06-14 19:19:50 -04:00
Nik Everett d0e4485d42 Move NamingConventionsCheck into buildSrc
This will let things that don't depend on :test:framework like the
client use it.

Also skip initializing the classes we check because we don't care
about their initialization behavior because we're not executing them.
This makes the naming conventions check pretty close to instant
from a "human eye" perspective.
2016-06-14 18:30:34 -04:00
Jack Conradson f132a8f1c8 Merge pull request #18871 from jdconrad/cast
Fix Casting Bug
2016-06-14 14:45:26 -07:00
Martijn van Groningen 14d6b04944 test: don't return 0, at least one request must be added to msearch request
also the maxConcurrentSearchRequests() setter only support positive values.
2016-06-14 23:29:29 +02:00
Jack Conradson 5cef06fa3e Add a test. 2016-06-14 14:28:47 -07:00
Nik Everett f7f377791f Test: don't use 0 size for terms aggregation
It is no longer allowed.
2016-06-14 17:27:45 -04:00
Jack Conradson 36f7632232 Correct type checking during casting related to Object. 2016-06-14 14:12:23 -07:00
Nik Everett c8931768ba Clean up after test failure
If the test fails we properly clean up. Also add a toString
implementation so we get useful results on failure.
2016-06-14 16:16:19 -04:00
Robert Muir 2ebc5c342b Merge pull request #18867 from rmuir/more_indy_typing
improve unary operators and cleanup tests
2016-06-14 15:30:43 -04:00
Robert Muir b69e8aadbd refactor tests 2016-06-14 15:07:56 -04:00
Nik Everett 9c85569883 Test docs for plugins
We weren't doing it before because we weren't starting the plugins.
Now we are.

The hardest part of this was handling the files the tests expect
to be on the filesystem. extraConfigFiles was broken.
2016-06-14 14:32:29 -04:00
Ryan Ernst 399d023715 Merge pull request #18865 from rjernst/fix_extra_config_file
Test: Fix integ test extra config files to work with more than one
2016-06-14 10:59:26 -07:00
Nik Everett 3032a7c653 Cache FieldStats
This caches FieldStats at the field level. For one off requests or for
few indicies this doesn't save anything, but when there are 30 indices,
5 shards, 1 replica, 100 parallel requests this is about twice as fast
as not caching. I expect lots of usage won't see much benefit from this
but pointing kibana to a cluster with many indexes and shards, will be
faster.

Closes #18717
2016-06-14 13:57:18 -04:00
Ryan Ernst 0508fc3bf1 Test: Fix integ test extra config files to work with more than one
Groovy does some crazy capturing when using closures inside a loop. In
this case, it somehow decided the local loop variable would be
modified, and so each closure was getting a wrapped value that would be
updated on each loop iteration, until all the closures pointed at the
last value. This change fixes the loop to extract the object to be used by
the closures.
2016-06-14 10:54:50 -07:00
Nik Everett e392e0b1df Create get task API that falls back to the .tasks index
This adds a get task API that supports GET /_tasks/${taskId} and
removes that responsibility from the list tasks API. The get task
API supports wait_for_complation just as the list tasks API does
but doesn't support any of the list task API's filters. In exchange,
it supports falling back to the .results index when the task isn't
running any more. Like any good GET API it 404s when it doesn't
find the task.

Then we change reindex, update-by-query, and delete-by-query to
persist the task result when wait_for_completion=false. The leads
to the neat behavior that, once you start a reindex with
wait_for_completion=false, you can fetch the result of the task by
using the get task API and see the result when it has finished.

Also rename the .results index to .tasks.
2016-06-14 13:37:34 -04:00
Robert Muir e4dc469e58 Merge pull request #18849 from rmuir/give_indy_ops_types
Remove casts and boxing for dynamic math
2016-06-14 13:01:04 -04:00
Robert Muir 79f0ab2fc6 rename this variable 2016-06-14 12:51:29 -04:00
Simon Willnauer ee2ba13cce Register Highlighter instances instead of classes (#18859)
This change detaches highlighter registration from Guice. It's just a
small step into the right direction.
2016-06-14 17:04:58 +02:00
Colin Goodheart-Smithe d7e3f9e4eb #18854 Remove size 0 options in aggregations
Remove size 0 options in aggregations
2016-06-14 15:32:42 +01:00
Christoph Büscher 32f141223d Merge pull request #18800 from cbuescher/fix-interval-rounding-uneven
Fix invalid rounding value for TimeIntervalRounding close to DST transitions
2016-06-14 16:22:11 +02:00
Nik Everett 49c09f1527 Test: Fix error message check for Windows
Betrayal! CRLF strikes again. Weakened the test from equals to
containsString.
2016-06-14 09:56:49 -04:00
Christoph Büscher 03f5aa8ea0 Don't throw IllegalInstantException to determine DST gap
By taking the logic from DateTimeZone#convertLocalToUTC(long, boolean) we
can avoid throwing the exception.
2016-06-14 15:36:00 +02:00
Simon Willnauer 4d78f280ed Remove dead code and dead parameters (#18855) 2016-06-14 15:25:44 +02:00
Christoph Büscher 5abe1f7bb2 Fix invalid rounding value for TimeIntervalRounding close to DST transition
There are edge cases where rounding a date to a certain interval using a time
zone with DST shifts can currently cause the rounded date to be bigger than the
original date. This happens when rounding a date closely after a DST start and
the rounded date falls into the DST gap.

Here is an example for CET time zone, where local time is set forward by one
hour at 2016-03-27T02:00:00+01:00 to 2016-03-27T03:00:00.000+02:00:

The date 2016-03-27T03:01:00.000+02:00 (1459040460000) which is just after the
DST change is first converted to local time (1459047660000). If we then apply
interval rounding for a 14m interval in local time, this  takes us to
1459047240000, which unfortunately falls into the DST gap.  When converting
this back to UTC, joda provides options to throw exceptions on illegal dates
like this, or correct this by adjusting the date to the new time zone offset.
We currently do the later, but this leads to converting this illegal date back
to 2016-03-27T03:54:00.000+02:00 (1459043640000), giving us a date that is
larger than the original date we wanted to round.

This change fixes this by using the "strict" option of 'convertLocalToUTC()'
to detect rounded dates that fall into the DST gap. If this happens, we can use
the time of the DST change instead as the interval start.

Even before this change, intervals around DST shifts like this can be shorter
than the desired interval.  This, for example, happens when the requested
interval width doesn't completely fit into the remaining time span when the DST
shift happens. For example, using a 14m interval in UTC+1 (CET before DST
starts) leads to the following valid rounding values around the time where DST
happens:

2016-03-27T01:30:00+01:00
2016-03-27T01:44:00+01:00
2016-03-27T01:58:00+01:00
2016-03-27T02:12:00+01:00
2016-03-27T02:26:00+01:00
...

while the rounding values in UTC+2 (CET after DST start) are placed like this
around the same time:

2016-03-27T02:40:00+02:00
2016-03-27T02:54:00+02:00
2016-03-27T03:08:00+02:00
2016-03-27T03:22:00+02:00
...

From this we can see then when we switch from UTC+1 to UTC+2 at 02:00 the last
rounding value in UTC+1 is at 01:58 and the first valid one in UTC+2 is at
03:08, so even if we decide to put all the dates in between into one rounding
interval, it will only cover 10 minutes. With this change we choose to use the
moment of DST shift as an aditional interval separator, leaving us with a 2min
interval from [01:58,02:00) before the shift and an 8min interval from
[03:00,03:08) after the shift.

This change also adds tests for the above example and adds randomization to the
existing TimeIntervalRounding tests.
2016-06-14 14:59:51 +02:00
Colin Goodheart-Smithe bec621d46f changes from review 2016-06-14 13:45:03 +01:00
Clinton Gormley f5836951f8 Fixed link in PR template to CONTRIBUTING 2016-06-14 14:34:11 +02:00
Vladimir Kovpak d5f71f9e85 Updated from parameter description. (#18852)
Not sure that my description better but origin description looks very weird,
and i try to make emphasize to offset...
2016-06-14 14:33:15 +02:00
Itamar Syn-Hershko 5a9303dec2 Fixing typos (#18851) 2016-06-14 14:22:55 +02:00
Colin Goodheart-Smithe cfd3356ee3 Remove size 0 options in aggregations
This removes the ability to set `size: 0` in the `terms`, `significant_terms` and `geohash_grid` aggregations for the reasons described in https://github.com/elastic/elasticsearch/issues/18838

Closes #18838
2016-06-14 13:07:02 +01:00
Robert Muir a12937d548 painless: remove casts and boxing for dynamic math 2016-06-14 00:49:13 -04:00
Robert Muir f8738c853b Merge pull request #18847 from rmuir/refactor_def_math
painless: refactor def math
2016-06-13 19:39:37 -04:00
Robert Muir 7ecb4ca4e9 Refactor def math 2016-06-13 18:56:28 -04:00
Boaz Leskes 7a226122e3 MasterFaultDetection can leak an exception during shutdown 2016-06-14 01:16:17 +03:00
Nik Everett 6617b53422 Painless: Add support for /regex/
Adds `/regex/` as a regex constructor. A couple of fun points:
1. This makes generic the idea of arbitrary stuff adding a constant.
Both SFunction and LRegex create a statically initialized constant.
Both go through Locals to do this because they LRegex isn't directly
iterable from SScript.
2. Differentiating `/` as-in-division from `/` as-in-start-of-regex
is hard. See:
http://www-archive.mozilla.org/js/language/js20-2002-04/rationale/syntax.html#regular-expressions
The javascript folks have a way, way tougher time of it then we do
because they have semicolon insertion. We have the much simpler
delimiter rules. Even with our simpler life we still have to add
a hack to get lexing `/regex/` to work properly. I chose to add
token-level lookbehind because it seems to be a pretty contained hack.
I considered and rejected lexer modes, a lexer member variable,
having the parser set variables on the lexer (this is a fairly common
solution for js, I believe), and moving regex parsing to the parser
level.
3. I've only added a very small subset of java.util.regex to the
whitelist because it is the subset I needed to test LRegex sanely.
More deserves to be added, and maybe more regex syntax like `=~` and
`==~`. Those can probably be added without too much pain.
2016-06-13 18:11:45 -04:00
Martijn van Groningen f132959c38 Merge pull request #18845 from martijnvg/percolator_dismax_query
Add percolator query extraction support for dismax query
2016-06-13 20:27:50 +02:00
Martijn van Groningen b8309b143f percolator: add query extraction support for dismax query 2016-06-13 20:14:35 +02:00
Aaron Mildenstein 41810bd63c Pluralize "index" (#18811)
This doesn't just happen to "an index" unless you're restoring just one.  It reads better this way, IMO.
2016-06-13 20:05:33 +02:00
Robert Muir f295754498 Merge pull request #18831 from rmuir/moreRefs
painless: array constructor references
2016-06-13 13:36:26 -04:00
Robert Muir c6e144f669 remove stray tab, fix comment 2016-06-13 13:35:11 -04:00
Ryan Ernst 87b7296790 Merge pull request #18844 from rjernst/bump_version_alpha4
Set next version back to alpha4
2016-06-13 10:19:12 -07:00
eratio08 26aacfff72 default values for BM25 Similarity (#18778)
assuming elasticsearch uses the lucene default values
2016-06-13 18:57:44 +02:00
Nik Everett 4c15d143d9 Port reindex's script tests to painless
All but the timeout ones work. Those are skipped for now.
2016-06-13 12:28:39 -04:00
Ryan Ernst 991c2221a1 Set next version back to alpha4 2016-06-13 09:26:45 -07:00
Jason Tedor 30b8a51eb9 Fix lang-painless packaging test
This commit fixes a failing lang-painless packaging test after a change
to the dependencies was made in commit
0bfb166eeb.
2016-06-13 10:37:21 -04:00