Commit Graph

11189 Commits

Author SHA1 Message Date
Britta Weber cea8999406 Store: Delete index folder if all shards were allocated away from a data only node
If a folder for an index was created that folder is never deleted from that node unless the index is deleted.
Data only nodes therefore can have empty folders for indices that they do not even have shards for.
This commit makes sure empty folders are cleaned up after all shards have moved away from a data only
node. The behavior is unchanged for master eligible nodes.

closes #9985
2015-03-05 15:48:41 +01:00
Matias Tealdi cba6dff3ac fixing typo in expDecayFunction and adding offset to all dacay functions
closes #9887
2015-03-05 12:28:08 +01:00
Colin Goodheart-Smithe 5c44db50bc [DOCS] update JAVA API with aggregation changes
The Histogram and Range APIs for the aggregations changed so that there was a common interface between he types of Range/Histogram. This PR reflects that change in the Java API docs

Contributes to #9976
2015-03-05 11:09:49 +00:00
Colin Goodheart-Smithe 8935959cbf [TEST] removed custom index settings for all DateHistogram tests
In favour of randomising number of shards and replicas and only the extended bounds test sets number of shards and replicas explicitly
2015-03-05 10:29:22 +00:00
Michael McCandless 24d8c74a52 Core: throttle delete-by-query when merges are falling behind
Delete-by-query is incredibly costly because it forces a refresh each
time, so if you are also indexing this can cause massive segment
explosion.

This change throttles delete-by-query when merges can't keep up.  It's
likely not enough (#7052 is the long-term solution) but can only
help.

Closes #9986
2015-03-04 15:25:10 -05:00
Britta Weber 764901a9cd [TEST] make sure update task is actually executed
The update task that was submitted in this test never got executed
if node_2 was not master.
2015-03-04 15:49:49 +01:00
Simon Willnauer 6b95a05fc7 Revert "[TEST] Enable trace logging for translog recovery"
This reverts commit 52d53e658f.
2015-03-04 15:33:28 +01:00
Martijn van Groningen f81805d7d3 Test: muted testStaleMasterNotHijackingMajority 2015-03-04 15:07:59 +01:00
Colin Goodheart-Smithe 010493682c Search: fixed log to print throwable correctly
In TransportSearchTypeAction one of the logger calls was passing the throwable in as a parameter for the message rather than a throwable to be printed as a stack trace. This change fixes it so the throwable is printed properly
2015-03-04 13:50:23 +00:00
Simon Willnauer 52d53e658f [TEST] Enable trace logging for translog recovery 2015-03-04 11:48:10 +01:00
Lee Hinman a5ab49dc70 [TESTS] Flush and refresh before querying in IndexWithShadowReplicasTests 2015-03-03 14:35:22 -07:00
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
Drew Raines c7e638ad22 _cat/nodes: Thread null handling through stats and info
Closes #6297
2015-02-27 23:25:07 -06: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