Commit Graph

6169 Commits

Author SHA1 Message Date
Simon Willnauer caee7c8831 Stableize recoverWhileRelocating by expanding replicas at the end 2013-11-01 22:16:24 +01:00
Shay Banon f720531328 protect ImmutableOpenMap builder from using the built map after build has been called 2013-11-01 20:53:24 +01:00
Shay Banon 633e781204 remove unneeded check... 2013-11-01 19:44:25 +01:00
Luca Cavanna afa0ab6226 Fixed ack behaviour when no ack is expected from any node or timeout is set to 0
We now return acknowledged true when no wait is needed (mustAck always returns false). We do wait for the master node to complete its actions though. Previously it would try to timeout and hang due to a CountDown#fastForward call when the internal counter is set to 0

We now return acknowledged false without starting the timeout thread when the timeout is set 0, as starting the wait and immediately stopping the thread seems pointless.

Added coverage for ack in ClusterServiceTests
2013-11-01 18:24:45 +01:00
Shay Banon c63741db04 Introduce a new ImmutableOpenMap
this map is a "true" immutable map, encapsulating an open impl, and has a builder that allows it to be built easily.
the builder has the optimization of using clone if its being built based on an existing immutable map.
2013-11-01 18:20:25 +01:00
Luca Cavanna a021c1d4f2 Improved acknowledgement test for cluster reroute with dry_run flag
Usually acknowledged true means that all nodes have digested the change and are in sync. When no changes are made, there is no need to push a new cluster state, no need to wait for ack either, but can't guarantee that all nodes are in sync.

When using cluster reroute with dryRun flag no changes are made, this test was based on the wrong assumption that acknowledged meant all nodes were in sync, which is not the case here.

Changed the test to only read the cluster state from the master, to check that nothing changed there after processing the cluster state update.
2013-11-01 15:45:31 +01:00
Dan Everton 6df60b7271 [DOC] Improve documentation on search stats groups
Document the ability to return all search statistics groups and provide examples of returning search statistics for groups.
2013-11-01 13:53:39 +01:00
Simon Willnauer c78c5469e4 Randomize exceptions when file is deleted while still open.
This somehow emulates a behavior on windows but we should test the
other code paths as well.
2013-11-01 11:47:22 +01:00
Martijn van Groningen 30ab6f841d [DOCS] Fixed percolate docs errors 2013-11-01 11:44:07 +01:00
Martijn van Groningen d660b18298 Fixed bug (NPE) in mpercolate api, defaults from percolating existing documents where also applied for the regular percolate api, these defaults were none existing (null). 2013-11-01 11:17:16 +01:00
Martijn van Groningen 65fc90728e The mpercolate api rest endpoint should also support http get. 2013-11-01 11:09:17 +01:00
Luca Cavanna 29363d8139 Removed needless concreteIndices call, already called in doExecute and set to the request object 2013-10-31 20:58:52 +01:00
Clinton Gormley 4206cc988e [DOCS] Typo on shingle tokenfilter 2013-10-31 20:18:00 +01:00
Luca Cavanna 3ee9f27fbe Fixed delete mapping to return acknowledged false when ack times out 2013-10-31 16:28:44 +01:00
Martijn van Groningen 81089fb228 Fixed concurrency issue in simple id cache. The lget() of a map can only be used if the map isn't shared. 2013-10-31 16:20:29 +01:00
Shay Banon c68016bb83 better timeout handling waiting for primary to be active for indexing
take into account the correct delta timeout when scheduling it, since now we can retry again after removing a listener
2013-10-31 15:54:37 +01:00
Simon Willnauer fcfc41209b use Math.max rather than an if statement 2013-10-31 14:36:24 +01:00
Simon Willnauer 59588913b3 Evilize RecoveryWhileUnderLoadTests a bit more 2013-10-31 14:25:28 +01:00
Shay Banon 5f2b7dc266 improve moving from post_recovery to started
we need to move to started from post recovery on cluster level changes, we need to make sure we handle a global state change of relocating, which can happen (and not pass through started)
2013-10-31 14:23:58 +01:00
Opak Alex 6856cfc5e3 add reference for ember-data-elasticsearch-kit to integrations page 2013-10-31 11:40:01 +01:00
Shay Banon 5cd56e5cea Improve new field mapping introduction performance
Improve the introduction of new fields into the concrete parsed mappings by not relying on immutable maps and copying over entries, but instead using open maps (which will also use less memory), and using clone to perform the copy on write logic
2013-10-31 11:07:52 +01:00
Simon Willnauer f01d3a18ad Simplify FieldData API
Removing #getValue and #hasValue to have a simple and consistent API
for multiple values.
2013-10-31 10:10:35 +01:00
Shay Banon 75eda6e957 upgrade randomized testing to 2.0.12 2013-10-31 10:02:03 +01:00
Alexander Reelsen dfcb3ca2d4 RegexpQueryBuilder now implements MultiTermQueryBuilder
This allows the RegexpQueryBuilder to be used in span queries

Added tests for all span multi term queries.
Also updated the documentation and removed mentioning of numeric range
queries for span queries (they have to be terms).

Closes #3392
2013-10-31 09:12:57 +01:00
Igor Motov d43f3d83d8 The +index pattern without a wildcard in the index list is handled inconsistently
Fixes #3979
2013-10-30 16:36:55 -04:00
Igor Motov 3b4b05e2c9 Fix bug in TransportShardReplicationOperationAction retry mechanism
This issue was causing some index requests against shards in POST_RECOVERY state to hang.
2013-10-30 16:36:55 -04:00
Andrew Raines 5d46e69154 Add ES version to _cat/nodes. 2013-10-30 15:35:41 -05:00
Andrew Raines 256605f065 Add heap used percentage to _cat/nodes.
Closes #4020.
2013-10-30 13:50:29 -05:00
Andrew Raines b2e8ec2924 Add node name & ip to _cat/recovery.
Closes #4016.
2013-10-30 12:38:31 -05:00
Boaz Leskes 8819f91d47 Add a GetFieldMapping API
This new API allows to get the mapping for a specific set of fields rather than get the whole index mapping and traverse it.
The fields to be retrieved can be specified by their full path, index name and field name and will be resolved in this order.
In case multiple field match, the first one will be returned.

Since we are now generating the output (rather then fall back to the stored mapping), you can specify `include_defaults`=true on the request to have default values returned.

Closes #3941
2013-10-30 16:16:36 +01:00
Andrew Raines f16eb7a243 Add _cat/allocation/{nodes}.
Visualizes how shards distribute across the cluster.

% curl localhost:9200/_cat/allocation
shards diskUsed diskAvail diskRatio ip        node
     2   85.6gb   379.4gb     22.6% 127.0.0.1 MacTaggert, Moira
     2   85.6gb   379.4gb     22.6% 127.0.0.1 Jarvis, Edwin

% curl localhost:9200/_cat/allocation/Jar\*
shards diskUsed diskAvail diskRatio ip        node
     2   85.6gb   379.4gb     22.6% 127.0.0.1 Jarvis, Edwin
2013-10-30 10:09:45 -05:00
Shay Banon 8aa2ee7bac indices cluster state service should execute as one of the first listeners
its preferable to execute the indices cluster state service as quickly as possible, as one of the first listeners, so it will apply the cluster state to the local state
potentially, it should even execute before it state is "visible" (through the state call), but that's another change...
2013-10-30 15:53:31 +01:00
Clinton Gormley 8b2efd4849 [DOCS] Added a version flag to percolation 2013-10-30 13:59:03 +01:00
Clinton Gormley 0585890a5f [DOCS] Fixed a typo 2013-10-30 13:57:18 +01:00
Shay Banon 8a62619fb9 throw index already exists failure when it exists as alias on creation
make sure to throw the already exists exception, so when indexing into an alias, and it has not propagated yet through the cluster state, it will end up being ignored if it already exists
2013-10-30 13:47:31 +01:00
Boaz Leskes ed39e79d8f minor improvement to FullRollingRestartTests failure output 2013-10-30 12:08:54 +01:00
Simon Willnauer 454dc53483 Add back hashed BytesValues optimization that got lost in a previous commit.
Some FieldData consumers require hash values per byte. We provide an optimization
that allows to cache the hashes internally if the consumer knows that they are needed
this optimization got lost in a previous commit. This commit adds them back and folds
the dedicated method into AtomicFieldData#getBytesValues(true|false)
2013-10-30 11:48:00 +01:00
Boaz Leskes 542f021d6f Also resend shard started message if shard state is in POST_RECOVERY and master thinks it's initializing.
Closes #4009
2013-10-30 11:42:57 +01:00
Shay Banon 8f21d2831a explicitly enable http when running plugin tests
add an option to force a setting when building a node, overriding if its explicitly set as system property
2013-10-30 02:09:43 +01:00
Luca Cavanna 9cb54c0f2e Added getters for fs.path, fs.mount and fs.dev in node stats api
Closes #4004
2013-10-29 14:49:07 +01:00
Alexander Reelsen 2ec9742147 [DOCS] Extending setup as a service documentation
* Tell people to use ES_JAVA_OPTS for es.node.name or similar parameters
* Showing a simple way to install Oracle JDK on ubuntu/debian

Closes #3999
2013-10-29 13:58:06 +01:00
Alexander Reelsen b6d2be7a51 Improving test stability for CompletionTests
Randomized testing caught an issue showing that the test should
flush after indexing a document, as always the same document is
indexed.
2013-10-29 13:11:34 +01:00
Luca Cavanna 9e6fab3a6d Added support for acknowledgements to update cluster settings api
As a side note, the internal reroute call is now part of the ack mechanism. That means that if the response contains acknowledged flag, the internal reroute that was eventually issued was acknowledged too. Also, even if the request is not acknowledged, the reroute is issued before returning, which means that there is no need to manually call reroute afterwards to make sure the new settings are immediately applied.

Closes #3995
2013-10-29 11:45:59 +01:00
Luca Cavanna d10bd2495d Added support for acknowledgements to cluster reroute api
Closes #3985
2013-10-29 11:45:59 +01:00
Luca Cavanna f23a1e23b1 Added support for node acknowledgements in delete mapping api
Closes #3984
2013-10-29 11:45:59 +01:00
Luca Cavanna 5f1ebf20f7 Added support for acknowledgement in update index settings api
Added support for serialization based on version to AcknowledgedResponse. Useful in api that don't support yet the acknowledged flag in the response.
Moved also ack warmer tests to more specific AckTests class

Close #3983
2013-10-29 11:45:59 +01:00
Luca Cavanna f425d4af2f Added ack call when the cluster state has not changed
The missing call could cause a cluster state update to hang in case there is no change no apply
2013-10-29 11:45:58 +01:00
Luca Cavanna 5639002a8e Fixed test cluster scope to be able to run it multiple times if needed 2013-10-29 11:10:31 +01:00
Igor Motov 01d51ef434 Fix String.format to use Locale.ROOT in RestRecoveryAction 2013-10-28 23:37:11 -04:00
David Pilato 5d90abf701 mget API should support global routing parameter
mget API support `_routing` field but not `routing` parameter.

Reproduction here:

```sh
curl -XDELETE "http://localhost:9200/test/"; echo
curl -XPUT "http://localhost:9200/test/" -d'{
   "settings": {
      "number_of_replicas": 0,
      "number_of_shards": 5
   }
}'; echo

curl -XPUT 'http://localhost:9200/test/order/1-1?routing=key1' -d '{
   "productName":"doc 1"
}'; echo
curl -XPUT 'http://localhost:9200/test/order/1-2?routing=key1' -d '{
   "productName":"doc 2"
}'; echo
curl -XPUT 'http://localhost:9200/test/order/1-3?routing=key1&refresh=true' -d '{
   "productName":"doc 3"
}'; echo

curl -XPOST 'http://localhost:9200/test/order/_mget?pretty' -d '{
    "docs" : [
        {
            "_index" : "test",
            "_type" : "order",
            "_id" : "1-1",
            "_routing" : "key1"
        },
        {
            "_index" : "test",
            "_type" : "order",
            "_id" : "1-2",
            "_routing" : "key1"
        },
        {
            "_index" : "test",
            "_type" : "order",
            "_id" : "1-3",
            "_routing" : "key1"
        }
    ]
}'; echo

curl -XPOST 'http://localhost:9200/test/order/_mget?pretty&routing=key1' -d '{
	"ids": [
		"1-1",
		"1-2",
		"1-3"
	]
}'; echo
```

Closes #3996.
2013-10-28 21:05:55 +01:00