Commit Graph

22914 Commits

Author SHA1 Message Date
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
Areek Zillur df4a959d6c removed support for customs from create index request 2016-06-10 12:06:50 -03:00
Areek Zillur 62f98767eb removed redundant Fields class 2016-06-10 12:02:36 -03: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
javanna 777d438f48 [TEST] use jdk-internal bundled signature (rather than the previously removed jdk-non-portable) 2016-06-10 12:46:33 +02:00
javanna 656422cff6 move shutdownNow within try block 2016-06-10 11:42:25 +02:00
javanna 3d7186c81f make DeadHostState final 2016-06-10 11:40:35 +02:00
javanna 6db90da25e [TEST] Remove usage of @SuppressForbidden due to sun HttpServer usage, resolve some violations that were hidden by it 2016-06-10 11:40:13 +02:00
javanna 432efc75fb catch Exception rather than Throwable 2016-06-10 11:39:08 +02:00
javanna 9cbfa984fa Merge branch 'master' into feature/http_client 2016-06-10 11:18:21 +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
javanna a5e329e563 [TEST] use animalsniffer annotation @IgnoreJRERequirement (similar to @SuppressForbidden) rather than exclusion pattern 2016-06-10 10:11:21 +02: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
javanna 0af9d2c767 Build: add animalsniffer to detect usage of java8 apis in client and client-sniffer 2016-06-10 09:51:47 +02: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
javanna 2856ab07de Build: enable dependency licenses check for client-sniffer, exclude org.elasticsearch jars from checks 2016-06-09 23:48:49 +02:00
javanna f38ce72004 make forbiddenApisTest work for client and client-sniffer 2016-06-09 23:44:34 +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
Areek Zillur 41d31541a6 Allow users to override the name for the rollover index 2016-06-09 13:43:19 -04:00
Nik Everett a0585269be [docs] s/lags/Flags/
Copy and paste lots an `F`.
2016-06-09 13:08:53 -04:00
Areek Zillur 756af81b00 change rollover rest-api placeholder name 2016-06-09 12:53:24 -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
Areek Zillur a9f24ea2dc fail rollover request if rollover index already exists 2016-06-09 12:38:12 -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