Commit Graph

22446 Commits

Author SHA1 Message Date
Robert Muir 65352face2 fix too long line 2016-06-11 15:04:49 -04:00
Robert Muir 592042601f def case working 2016-06-11 15:02:43 -04:00
Uwe Schindler 876f0a613e Unfuck the MethodWriter nesting. All MethodWriters should only live separately from each other, no nesting 2016-06-11 21:00:06 +02:00
Robert Muir e2f999b025 make this static final 2016-06-11 14:33:48 -04:00
Robert Muir 8d5a70200f write refs for functions 2016-06-11 14:29:15 -04:00
Robert Muir ab457be9d8 remove unnecessary semicolon and return 2016-06-11 13:48:04 -04:00
Robert Muir 0bfb166eeb merge master 2016-06-11 13:23:17 -04:00
Nik Everett 4a265d0279 Painless: Add } as a delimiter. Kindof.
Add `}` is statement delimiter but only in places where it is
otherwise a valid part of the syntax, specificall the end of a block.
We do this by matching but not consuming it. Antlr 4 doesn't have
syntax for this so we have to kind of hack it together by actually
matching the `}` and then seeking backwards in the token stream to
"unmatch" it. This looks reasonably efficient. Not perfect, but way
better than the alternatives.

I tried and rejected a few options:
1. Actually consuming the `}` and piping a boolean all through the
grammar from the last statement in a block to the delimiter. This
ended up being a rather large change and made the grammar way more
complicated.
2. Adding a semantic predicate to delimiter that just does the
lookahead. This doesn't work out well because it doesn't work (I
never figured out why) and because it generates an *amazing*
`adaptivePredict` which makes a super huge DFA. It looks super
inefficient.

Closes #18821
2016-06-11 12:51:25 -04:00
Jack Conradson c3bf3b34c2 Merge pull request #18824 from jdconrad/stubby
Add Lambda Stub Node
2016-06-10 17:43:14 -07:00
Jack Conradson e293000d8d Merge branch 'master' into stubby 2016-06-10 16:22:17 -07:00
Jack Conradson bd94c62adf Added a stub node for lambda expressions. 2016-06-10 16:18:36 -07:00
Nik Everett 387155559e Make TimeValue Writeable instead of Streamable
Writeable is better for immutable objects like TimeValue.

Switch to writeZLong which takes up less space than the original
writeLong in the majority of cases. Since we expect negative
TimeValues we shouldn't use
writeVLong.
2016-06-10 18:24:16 -04:00
Robert Muir 200af0c6a6 Merge pull request #18818 from rmuir/capturingReferences
painless: add capturing method references
2016-06-10 18:15:00 -04:00
Robert Muir 16d17351f7 don't use loadLocal, add new node to package-info 2016-06-10 17:37:57 -04:00
Robert Muir 9e0a70c4b2 Merge branch 'master' into capturingReferences 2016-06-10 17:10:56 -04:00
Jack Conradson f98be6fa06 Add functions to Painless.
Closes #18810
2016-06-10 13:59:59 -07:00
Jason Tedor 86f1bedaab Rename NettyTransportChannel#close
This commit renames the NettyTransportChannel#close method to
NettyTransportChannel#release to clarify the semantics.
2016-06-10 15:26:49 -04:00
Robert Muir edb0fd3b88 painless: add capturing method references 2016-06-10 14:24:58 -04:00
Nik Everett 25fde039fd [docs] Flow the refresh docs
They were making multiple pages but that is silly. They should all
be one page.
2016-06-10 10:42:56 -04:00
Jason Tedor 6d8692576e Mark field in ReindexSameIndexTests as final
This commit restores a final modifier on the field
AutoCreateIndex#AUTO_CREATE_INDEX that was inadvertently removed in
a25b8ee1bf.
2016-06-10 10:20:45 -04:00
Adrien Grand 44c653f5a8 Upgrade to lucene-6.1.0-snapshot-3a57bea. 2016-06-10 16:18:12 +02:00
Jason Tedor a25b8ee1bf Make random UUIDs reproducible in tests
Today we use a random source of UUIDs for assigning allocation IDs,
cluster IDs, etc. Yet, the source of randomness for this is not
reproducible in tests. Since allocation IDs end up as keys in hash maps,
this means allocation decisions and not reproducible in tests and this
leads to non-reproducible test failures. This commit modifies the
behavior of random UUIDs so that they are reproducible under tests. The
behavior for production code is not changed, we still use a true source
of secure randomness but under tests we just use a reproducible source
of non-secure randomness.

It is important to note that there is a test,
UUIDTests#testThreadedRandomUUID that relies on the UUIDs being truly
random. Thus, we have to modify the setup for this test to use a true
source of randomness. Thus, this is one test that will never be
reproducible but it is intentionally so.

Relates #18808
2016-06-10 10:18:06 -04:00
Ali Beyad 43e07c0c88 Better handling of an empty shard's segments_N file
When trying to restore a snapshot of an index created in a previous
version of Elasticsearch, it is possible that empty shards in the
snapshot have a segments_N file that has an unsupported Lucene version
and a missing checksum.  This leads to issues with restoring the
snapshot.  This commit handles this special case by avoiding a restore
of a shard that has no data, since there is nothing to restore anyway.

Closes #18707
2016-06-10 09:57:09 -04:00
Nik Everett d733fb689b Better error message when mapping configures null
Closes #18803
2016-06-10 09:43:18 -04:00
Yannick Welsch a2c506acd3 Fix sync flush total shards statistics (#18766) 2016-06-10 13:39:47 +02:00
Yannick Welsch 6ea89004cd Make IndicesClusterStateService unit testable (#17270)
Testability of ICSS is achieved by introducing interfaces for IndicesService, IndexService and IndexShard. These interfaces extract all relevant methods used by ICSS (which do not deal directly with store) and give the possibility to easily mock all the store behavior away in the tests (and cuts down on dependencies).
2016-06-10 12:47:41 +02:00
Colin Goodheart-Smithe 62025d39d3 #18414 Adds aggregation profiling to the profile API
Adds aggregation profiling to the profile API
2016-06-10 09:41:29 +01:00
Colin Goodheart-Smithe 1d76177510 Adds aggregation profiling (not including reduce phase)
Add Aggregation profiling initially only be for the shard phases (i.e. the reduce phase will not be profiled in this change)

This change refactors the query profiling class to extract abstract classes where it is useful for other profiler types to share code.
2016-06-10 09:02:07 +01:00
Jim Ferenczi 39a7bec481 Merge pull request #18782 from jimferenczi/max_slices_per_scroll
Add an index setting to limit the maximum number of slices allowed in a scroll request.
2016-06-10 09:49:03 +02:00
Jim Ferenczi 439b2a96e5 Add an index setting to limit the maximum number of slices allowed in a scroll request (default to 1024). 2016-06-10 09:43:32 +02:00
Daniel Mitterdorfer 7229c91289 Remove trace logging from NettyHttpRequestSizeLimitIT
With this commit we revert back to normal behavior as the
underlying issue has been fixed with #18627.
2016-06-10 07:46:04 +02:00
Nik Everett e02d9f0945 Squash a race condition in RefreshListeners
It presented as listeners never being called if you refresh at the same
time as the listener is added. It was caught rarely by
testConcurrentRefresh. mostly this is removing code and adding a comment:

```
Note that it is not safe for us to abort early if we haven't advanced the
position here because we set and read lastRefreshedLocation outside of a
synchronized block. We do that so that waiting for a refresh that has
already passed is just a volatile read but the cost is that any check
whether or not we've advanced the position will introduce a race between
adding the listener and the position check. We could work around this by
moving this assignment into the synchronized block below and double
checking lastRefreshedLocation in addOrNotify's synchronized block but
that doesn't seem worth it given that we already skip this process early
if there aren't any listeners to iterate.
```
2016-06-09 13:48:41 -04:00
Nik Everett a0585269be [docs] s/lags/Flags/
Copy and paste lots an `F`.
2016-06-09 13:08:53 -04:00
Nik Everett 09cc4c449a [docs] Pattern replace char filter now support flags 2016-06-09 12:41:20 -04:00
gfyoung 6f222b5be1 Support flags in pattern replace char filter
Works just like pattern analyzer's flags param.

Closes #18362.
2016-06-09 12:39:23 -04:00
Nik Everett fb52c258fd [test] Check if RefreshListeners was called immediately
Return a boolean from RefreshListeners, true if we called the listener
inline and false if we didn't, and check it in the test.
2016-06-09 12:08:36 -04:00
Nik Everett bd276ef5f1 [test] Check for listener calling error
Failing to call a refresh listener is logger at WARN but that'll
cause test failure. This adds explicit assertions that there are
no errors.
2016-06-09 11:26:08 -04:00
Britta Weber 053a615686 [TEST] wait for yellow before query execution
We can remove this once https://github.com/elastic/elasticsearch/pull/18759
is in.
2016-06-09 15:11:48 +02:00
Robert Muir 6202b63ba7 Merge pull request #18789 from rmuir/java9_localdate_you_just_had_to_do_this_didnt_you
painless: exempt LocalDate from bridge method checks on java 9
2016-06-08 17:38:28 -04:00
Jason Tedor e9017f619e Improve performance of applyDeletedShards
This commit addresses a performance issue in
IndicesClusterStateService#applyDeletedShards. Namely, the current
implementation is O(number of indices * number of shards). This is
because of an outer loop over the indices and an inner loop over the
assigned shards, all to check if a shard is in the outer index. Instead,
we can group the shards by index, and then just do a map lookup for each
index.

Testing this on a single-node with 2500 indices, each with 2 shards,
creating an index before this optimization takes 0.90s and after this
optimization takes 0.19s.

Relates #18788
2016-06-08 16:08:00 -04:00
Christoph Wurm cd0473159a Installation and removal instructions for Ingest Plugins (#18769)
* Add install and remove instructions to ingest-geoip and ingest-attachment docs
2016-06-08 21:55:59 +02:00
Robert Muir 9826b64e1f Exempt LocalDate from bridge method checks on java 9
The painless whitelist has a lot of self-checking, in this case, it checks
for missing covariant overrides. It fails on java 9, because LocalDate.getEra()
now returns IsoEra instead of Era: https://bugs.openjdk.java.net/browse/JDK-8072746

To our checker, it thinks we were lazy with whitelisting :)

This means painless works on java 9 again
2016-06-08 15:47:09 -04:00
Simon Willnauer 9497b704bb [TEST] Fix NodeEnvironmentTests on Windows - use Path.resolve instead of platform dependent path seperator 2016-06-08 21:40:35 +02:00
Nik Everett 06d26635de Packaging tests: ingest-grok is now ingest-common 2016-06-08 14:03:48 -04:00
Nik Everett bd1af34506 [reindex] Extract runnable to inner class
Makes it more readable
2016-06-08 14:00:15 -04:00
Nik Everett 2437313e4e Remove extra logging
The test shouldn't be failing any more.
2016-06-08 13:52:43 -04:00
Nik Everett 5b94c4a25b Fix a race condition in reindex's rethrottle
If you rethrottled the request while is was performing a scroll
request then it wouldn't properly pick up the rethrottle for that
batch. This was causing test failure and might cause issues for
users. The work around is simple though: just issue the rethrottle
again with a slightly faster throttle than the first time.

Caught by:
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+multijob-os-compatibility/os=centos/525/console
2016-06-08 13:52:43 -04:00
Nik Everett 4b21157906 Remove setRefresh
It has been replaced with `setRefreshPolicy` which has support for
waiting until refresh with `setRefreshPolicy(WAIT_FOR)`.

Related to #1063
2016-06-08 13:50:59 -04:00
Lee Hinman 92349f70e2 Merge remote-tracking branch 'dakrone/igs-false2' 2016-06-08 10:49:20 -06:00
Lee Hinman c637fea84b Change the default of `include_global_state` from true to false for restores
This changes the default value to be false *only* for restore operations.

Resolves #18569
2016-06-08 10:48:36 -06:00