Commit Graph

10975 Commits

Author SHA1 Message Date
Clinton Gormley 3f9d4f9635 Update query-string-syntax.asciidoc
Closes #9965
2015-03-03 20:03:51 +01:00
Clinton Gormley 6a43ed8b28 Updated the resiliency status page for v1.4.0
Closes #9969
2015-03-03 19:50:13 +01:00
Lee Hinman 94a74ddaec [CORE] Handle truncated translog gracefully
We used to handle truncated translogs in a better manner (assuming that
the node was killed halfway through writing an operation and discarding
the last operation). This brings back that behavior by catching an
`EOFException` during the stream reading and throwing a
`TruncatedTranslogException` which can be safely ignored in
`IndexShardGateway`.

Fixes #9699
2015-03-03 08:25:03 -07:00
Britta Weber a064f57bc2 [TEST] increase suite timeout for OldIndexBackwardsCompatibilityTests
Test suite times out too often and it seems this is not because of actual
failures but becasue it is a long running test.
2015-03-03 15:44:11 +01:00
Martijn van Groningen b669e37c0b Docs: updated resilience page 2015-03-03 15:25:10 +01:00
Simon Willnauer 4becaffb41 [TEST] use context classloader to load testclasses 2015-03-03 14:34:13 +01:00
javanna 4ad33c30ac [TEST] Work around URI encode limitations in RestClient
We've been relying on URI for url encoding, but it turns out it has some problems. For instance '+' stays as is while it should be encoded to `%2B`. If we go and manually encode query params we have to be careful though not to run into double encoding ('+'=>'%2B'=>'%252B'). The applied solution relies on URI encoding for the url path, but manual url encoding for the query parameters. We prevent URI from double encoding query params by using its single argument constructor that leaves everything as is.

We can also revert back the expression script REST test that revealed this to its original content (which contains an addition).

Closes #9769
Closes #9946
2015-03-03 10:21:23 +01:00
Pius 430b091e7d Docs: Added default value
Added default value to `cluster.routing.allocation.node_initial_primaries_recoveries`

Closes #9955
2015-03-03 10:15:11 +01:00
Martijn van Groningen e559471948 Test: fix testStaleMasterNotHijackingMajority by waiting for the old master node to step down.
It may take some time for the old master node to step down anf for it to rejoin and that all nodes have it in the nodes list.
By waiting for the old master node to have stepped down, we can again rely on assertDiscoveryCompleted() to make sure that it has joined.
2015-03-03 08:49:14 +01:00
Lee Hinman 21e246f6a3 [TESTS] remove AwaitsFix from CircuitBreakerServiceTests
I beasted these tests for a while without failure, I would like to
re-enable them to see if they still fail.

Fixes #8710
Fixes #9270
2015-03-02 16:54:15 -07:00
Martijn van Groningen ca50221474 Test: fix DiscoveryWithServiceDisruptionsTests#isolatedUnicastNodes by starting a 4 node cluster instead of a 3 node cluster.
If the isolated unicast host is also a master node then its local cluster state gets unusable a source for pinging when the disruption stops.
All the nodes in the cluster state node list can be removed and at that time it will only ping itself and never find out about the other nodes.
(these nodes will not ping, because they are already following a new master)
2015-03-02 22:42:47 +01:00
Martijn van Groningen 7f6c65bf8e Test: increased logging 2015-03-02 21:16:24 +01:00
javanna b053fc97f6 [TEST] Make sure we restart the suite cluster after each test failure
CurrentTestFailedMarker is a RunListener that gets notified whenever a test fails, and we were using it to be able to restart the suite cluster after each failure. We were checking whether a test had failed in the @After method though, which runs before the listener gets notified, so the failed flag would always be false.

This commit makes sure that the suite cluster gets restarted not only when there are problems in the afterInternal method, but also after each test failure. In order to achieve this, we need to reset the cluster afterwards, when we get to know about both of the events (problem in afterInternal and test failure), and before resetting the currentCluster. Introduced a TestRule that keeps track of test failures and allows to execute arbitrary tasks when a test fails and when a test is completed (regardless of its result). Allows also to force the execution of the failure task (used in case of afterInternal issues rather than actual test failure).

Also updated ElasticsearchRestTests to make sure that the RestClient gets re-initialized in case we restart the suite cluster, otherwise all the subsequent tests fail. Improved this mechanism also to relate it directly to the restart of the cluster instead of checking whether the addresses have changed, which doesn't work anyway as the new cluster will use the same addresses but the client needs to be recreated anyway.

Closes #9015
2015-03-02 19:07:23 +01:00
Simon Willnauer df8206853b [TESTS] Make sure test end with ..Tests
This commit adds a simple testcase that ensures all our tests end with the right naming.

Closes #9945
2015-03-02 17:31:19 +01:00
Martijn van Groningen 68da7c05ee Test: fix npe 2015-03-02 16:41:19 +01:00
Martijn van Groningen 2b00ecb5b5 Test: use assertBusy to fix timing issue 2015-03-02 15:30:39 +01:00
Britta Weber 358fd176c1 [TEST] add Tests suffix 2015-03-02 13:46:45 +01:00
Britta Weber 600cb886da [TEST] add Tests suffix 2015-03-02 13:19:23 +01:00
Boaz Leskes 06c13dee07 Store: renameFilesSafe -> renameTempFilesSafe
relates to #9933
2015-03-02 13:00:48 +01:00
Boaz Leskes 9d99289074 Recovery: synchronize RecoveryState.timer methods
Avoids a minor concurrent race condition causing time() to potentially return a negative value

Closes #9943
2015-03-02 11:03:39 +01:00
Clinton Gormley c223ed0db4 Update search-type.asciidoc
Changed search_type docs to reflect that the `(dfs_)query_and_fetch` modes are an internal optimization and should not be specified explicitly by the user.

Relates to #9606
2015-03-02 10:55:22 +01:00
Clinton Gormley 8cba6509e4 REST: Fix script-expressions test to work with Perl
Closes #9931
2015-03-02 10:27:05 +01:00
Tanguy Leroux c457499cb2 [Native] Use direct mapping call in Kernel32Library
This commit modifies the Kernel32Library to use direct mapping instead of a proxy class when doing native calls on Windows platforms. It also adds the "createSecurityManager" permission to the tests.policy file, and adds unit tests that should have failed when the Java security manager is enabled.

Closes #9802
2015-03-02 09:48:18 +01:00
Pius a90e5c03b7 Update getting-started.asciidoc
Closes #9932
2015-03-01 21:07:09 +01:00
Pius a182c7428d Added note on max # of docs allowed in a shard 2015-03-01 21:07:07 +01:00
Geoff Bourne 0e09c02c56 Spelling out the sort order options
Closes #9768
2015-03-01 21:05:52 +01:00
Boaz Leskes c9b8c22850 Test: InternalEngineTests.testEnableGcDeletes missed closing translog 2015-03-01 17:14:42 +01:00
Boaz Leskes 4110c1ab6c Test: InternalEngineTests.testSegmentsWithMergeFlag should close it's translog
Also improve test suite tearDown to not fail if setUp didn't create engines, translogs etc.
2015-03-01 12:10:35 +01:00
Boaz Leskes ecbb9c03b0 Test: testOldIndexes start nodes async 2015-03-01 09:02:23 +01:00
Boaz Leskes facf87079c Test: add LoggingListener to ElasticsearchLuceneTestCase 2015-03-01 08:48:35 +01:00
Boaz Leskes eafba93919 Test: InternalEngineTests.testSimpleRecover should close snapshot 2015-03-01 08:48:14 +01:00
Boaz Leskes c346effd9c Test: InternalEngineTests - JVM specific paths + retry to clean up translogs on startUp
Files may still be locked
2015-03-01 00:51:36 +01:00
Clinton Gormley 03d6dae834 REST tests - disable expressions test for now
Java returns floating point but JSON contains integer
2015-02-28 19:31:28 +01:00
Clinton Gormley 4bb7520e6d Docs: Minor test change to Perl docs 2015-02-28 17:19:55 +01:00
Clinton Gormley 53d0a0a4b9 REST test: Fixed expressions test
Perl reads the number as a string, so instead mapped the field as a long
specifically.

Also, the value returned in JSON is an integer, not a float
2015-02-28 17:02:29 +01:00
Ryan Ernst 2e797b9d55 Test: ShadowEngineTests - close translogs on tear down here too 2015-02-27 22:05:42 -08:00
Clinton Gormley 8f73d95409 Update search.asciidoc
Removed operation threading from the docs. Not supported since v1.2.0

Closes #9917
2015-02-28 04:48:57 +01:00
Clinton Gormley 4d78026ef1 Updated copyright years to include 2015 2015-02-28 03:18:45 +01:00
cgp b1e6df3b6c Update span-multi-term-query.asciidoc
Added comma - there is no "term range" query

Closes #9855
2015-02-28 03:05:05 +01:00
Clinton Gormley e194fb3a07 Docs: Default distance unit in geo distance agg is metres, not km
Closes #9812
2015-02-28 01:45:29 +01:00
David Pilato 0c8da6bb84 [doc] Link mapper-attachment type documentation to its repo
As explained in elasticsearch/elasticsearch-mapper-attachments#101, we should have consistent documentation.

The best option is to link the  documentation in elasticsearch guide to the most recent README in the plugin repo.

Closes #9756
2015-02-27 22:18:59 +01:00
jaymode 4fbce94f44 Netty HTTP Transport: Change access modifiers to protected
Previously a few methods and many class members were package-private
or private and could not be referenced from overriding classes. This changes
the member variables and a few methods to have protected access, so they
can be referenced or overridden from a subclass.
2015-02-27 15:54:14 -05:00
Boaz Leskes 9b576763d7 Test: InternalEngineTests - close translogs on tear down 2015-02-27 21:53:25 +01:00
Ryan Ernst fe62e463e1 fix test bug leftover from #9914 2015-02-27 12:17:19 -08:00
Boaz Leskes 0cec37f3c3 Recovery: unify RecoveryState management to IndexShard and clean up semantics
We keep track of the current stage of recovery using an instance of RecoveryState which is stored on the relevant IndexShard. At the moment changes to this object are made in many places of the code, which are charged of doing it in the right order, keeping track of timers and many more. Also the changes to shard state are decoupled from the recovery stages which caused #9503.

This PR refactors this and brings all of the changes into IndexShard. It also makes all recovery follow the exact same stages and shortcut some. This is in order to keep things simple and always the same (those shortcuts didn't add anything, we ended doing it all anyway).

Also, all timer management is now folded into RecoveryState and unit tests are added.

This closes #9503 by moving the shard to post recovery only once the recovery is done (before they were decoupled), meaning that master promotion of the target shard to started can not cancel the recovery.

Closes #9902
2015-02-27 21:09:50 +01:00
IsaacHaze ee163e570b Docs: Update snapshots.asciidoc
Adds more determiners.

Closes #9673
2015-02-27 20:42:12 +01:00
Boaz Leskes 0f1c779d2c Engine: close snapshots before recovery counter
#9760 was a fix for translog leaking due to measing a delete flag. This is not needed here as we have a better solution to not loose the flag. This commit takes the changes from 1x in order  to keep the code base similar and enjoy the extra tests.

Closes #9760
2015-02-27 20:22:55 +01:00
Ryan Ernst 702b2abd1b fix compilation issue from forward port of #9916 2015-02-27 11:20:55 -08:00
Ryan Ernst dd0084de83 Mappings: Lock down _ttl field
While the parser allowed changing field type settings, these would never
have been serialized.  So this change simply removes parsing using
parseField. Backcompat will still work if a user uploads old settings
(they just would never have worked anyways, so we continue ignoring
them with 1.x, and 2.x will now error).

see #8143
closes #9914
2015-02-27 11:11:04 -08:00
Ryan Ernst 9d708e20a0 Mappings: Lock down _size field
This also changes the stored setting for _size to true (for
indexes created in 2.x).

see #8143
closes #9913
2015-02-27 11:09:52 -08:00