Commit Graph

9274 Commits

Author SHA1 Message Date
Simon Willnauer 88aec9e3c0 [TEST] Fix per-segment / per-commit exclude logic in CorruptFileTest 2014-08-29 11:43:52 +02:00
Lee Hinman b2827a09a9 [TEST] add AwaitsFix for testTranslogChecksums since it may cause OOME
if the size is corrupted
2014-08-29 10:11:50 +02:00
Michael Brackx 0fd3ef6df0 Client: Make the query builder nullable in filteredQuery.
Close #7398
2014-08-29 09:40:38 +02:00
Simon Willnauer d7a068d02c [TEST] Exclude per commit files rather than only segments_N
When we corrupt a file in the snapshot/restore case we have to corrupt
a per-segment file. The .del file might change with the commit / flush
that is triggered by the snapshot operation.
2014-08-29 09:22:03 +02:00
Simon Willnauer 91b8498cec [TEST] Port can have more or less than 4 digits 2014-08-29 08:57:35 +02:00
Martijn van Groningen c55341bf51 Core: Remove the warmer listener when the FixedBitSetFilterCache gets closed. 2014-08-28 20:58:34 +02:00
Martijn van Groningen 4c690fae47 Scan: Use ConcurrentHashMap instead of HashMap, because the readerStates is accessed by multiple threads during the entire scroll session.
Closes #7499
Closes #7478
2014-08-28 16:36:17 +02:00
Philip Wills a3c4137079 Aggregations: Encapsulate AggregationBuilder name and make getter public
Close #7425
2014-08-28 16:34:41 +02:00
Brian Murphy c165e640fc Indexed Scripts/Templates : Change the default auto_expand to 0-all
This commit changes the auto_expand_replicas setting for the ````.scripts```` index to
0-all from 1-all.
2014-08-28 15:31:44 +01:00
Brian Murphy f44bb502ee Indexed Scripts/Templates : Fix .script index template.
This commit makes the default number of shards for the .scripts index to ````1````, it also
forces the auto_expand replicas to ````1-all````. This change means that script index GET requests to load
scripts from the index should always use the local copy of the scripts index, preventing any network traffic or calls
on script GET.
2014-08-28 14:54:24 +01:00
javanna 88839ec546 [TEST] apply default settings by calling super.nodeSettings method when providing test specific methods 2014-08-28 15:35:35 +02:00
javanna a0e9532dca [TEST] make default settings don't override test specific settings 2014-08-28 15:35:34 +02:00
javanna 645db6867b [TEST] apply default settings before test specific ones to external nodes in bw comp tests, otherwise the defaults win all the time 2014-08-28 15:35:34 +02:00
Britta Weber 44dbd9b0c9 test: write heap dump to log folder
Per default the heap dump is written to target/JX/pidXYZ.hprof
In order to keep them when a new test is is started, they
should be written to log folder which is not cleared in a new
test run.
Heap dump location can be set with -Dtests.heapdump.path=/path/to/heapdump

closes #7452
2014-08-28 14:51:10 +02:00
Lee Hinman 09816fdf57 Validate create index requests' number of primary/replica shards
Fixes #7495
2014-08-28 14:20:32 +02:00
Simon Willnauer cc37ae13bc [CORE] Make network interface iteration order consistent
Today the iteration order of the interfaces might change across JVMs
this commit cleans up the NetworkUtils class and attempts to ensure
consistent iteration order across JVMs.
2014-08-28 12:35:56 +02:00
Simon Willnauer c93e6e3f67 [TEST] Fix RandomScoreFunctionTests#testConsistentHitsWithSameSeed 2014-08-28 12:31:47 +02:00
Boaz Leskes c6090e5d9b [Tests] add a debug logging message when starting an external node 2014-08-28 12:13:05 +02:00
Martijn van Groningen 6de18262dd Test: Increase the ping timeout to avoid that a candidate master node makes the decision to elect itself too soon. 2014-08-28 11:49:30 +02:00
Simon Willnauer 1d960d08f7 [TEST] only expand to 1 replica in SnapshotBackwardsCompatibilityTest 2014-08-28 11:20:33 +02:00
Simon Willnauer d062b2b0a4 [TEST] use a dedicated port range per test JVM
For reliability and debug purposes each test JVM should use it's own
TCP port range if executed in parallel. This also moves away from the
default port range to prevent conflicts with running ES instance on the local
machine.
2014-08-28 09:18:39 +02:00
londocr 1213eec834 Spelling error of aggregation 2014-08-28 08:57:12 +02:00
Ryan Ernst eb22d9ec24 FunctionScore: Fixed RandomScoreFunction to guard against _uid field not existing.
Also added a test case to check the random score works with queries on
an empty index.
2014-08-27 17:01:01 -07:00
Simon Willnauer 59da079bae [SNAPSHOT] Ensure BWC layer can read chunked blobs 2014-08-27 21:33:40 +02:00
Martijn van Groningen 94eed4ef56 Introduced FixedBitSetFilterCache that guarantees to produce a FixedBitSet and does evict based on size or time.
Only when segments are merged away due to merging then entries in this cache are cleaned up.

Nested and parent/child rely on the fact that type filters produce a FixedBitSet, the FixedBitSetFilterCache does this.
Also if nested and parent/child is configured the type filters are eagerly loaded by default via the FixedBitSetFilterCache.

Closes #7037
Closes #7031
2014-08-27 21:28:36 +02:00
Boaz Leskes 852a1103f3 [Internal] user node's cluster name as a default for an incoming cluster state who misses it
ClusterState has a reference to the cluster name since version 1.1.0 (df7474b9fc) . However, if the state was  sent from a master of an older version, this name can be set to null. This is an unexpected and can cause bugs. The bad part is that it will never correct it self until a full cluster restart where the cluster state is rebuilt using the code of the latest version.

This commit changes the default to the node's cluster name.

Relates to #7386

Closes #7414
2014-08-27 20:24:27 +02:00
Boaz Leskes 55e9f169c3 [Tests] change BasicBackwardsCompatibilityTest to be compatible with 1.0.3
Also increase the time we wait for an external node to join
Sadly tests are not yet stable enough, testing with 1.0.3 is still disabled
2014-08-27 20:14:45 +02:00
Ryan Ernst 65afa1d93b FunctionScore: Refactor RandomScoreFunction to be consistent, and return values in rang [0.0, 1.0]
RandomScoreFunction previously relied on the order the documents were
iterated in from Lucene. This caused changes in ordering, with the same
seed, if documents moved to different segments. With this change, a
murmur32 hash of the _uid for each document is used as the "random"
value. Also, the hash is adjusted so as to only return values between
0.0 and 1.0 to enable easier manipulation to fit into users' scoring
models.

closes #6907, #7446
2014-08-27 08:37:25 -07:00
Alexander Reelsen 3aa72f2738 Test: Allow global test cluster to have configurable settings source
This allows to reuse the global test cluster with specific configurations,
which is useful in plugins.
2014-08-27 17:04:14 +02:00
Lee Hinman eaf392163c Add translog checksums
Switches TranslogStreams to check a header in the file to determine the
translog format, delegating to the version-specific stream.

Version 1 of the translog format writes a header using Lucene's
CodecUtil at the beginning of the file and appends a checksum for each
translog operation written.

Also refactors much of the translog operations, such as merging
.hasNext() and .next() in FsChannelSnapshot

Relates to #6554
2014-08-27 15:18:17 +02:00
Adrien Grand b745b0151c Fielddata: Remove soft/resident caches.
These caches have no advantage compared to the default node cache. Additionally,
the soft cache makes use of soft references which make fielddata loading quite
unpredictable in addition to pushing more pressure on the garbage collector.

The `none` cache is still there because of tests. There is no other good
reason to use it.

LongFieldDataBenchmark has been removed because the refactoring exposed a
compilation error in this class, which seems to not having been working for a
long time. In addition it's not as much useful now that we are progressively
moving more fields to doc values.

Close #7443
2014-08-27 14:28:41 +02:00
Britta Weber 238efe505b bool query: parser should return match_all in case there are no clauses
This also fixes has_parent filters with a nested empty bool filter
(see test SimpleChildQuerySearchTests#test6722, the test should actually expect
either 0 results when searching for has_parent "test" or one result when
search for has_parent "foo")

closes #7240
closes #7347
2014-08-27 14:07:21 +02:00
Britta Weber a92300c5b5 explain score: fix explanation streaming
Complex explanations were always read as Explanations. Depending
on if the response was streamed or not the explanation was
therefore generated by a ComplexExplanation or by a regular
Explanation.

closes #7257
2014-08-27 14:07:20 +02:00
javanna 92ae3c84fe Index templates: Made template filtering generic and extensible via plugins
Added the ability to register template filters that are being applied when a new index is created. The default filter that checks whether the template pattern matches the index name always runs first, additional filters can also be registered so that templates can be filtered out based on custom logic.

Took the chance to add the handy source(Object... source) method to PutIndexTemplateRequest and corresponding builder

Closes #7459
Closes #7454
2014-08-27 12:37:36 +02:00
Simon Willnauer e4b7395026 [TEST] only bump replicas if we have enough nodes in the cluster 2014-08-27 12:14:45 +02:00
Colin Goodheart-Smithe 6797d73d7e [TEST] removed AwaitsFix, added checks to make sure indexed scripts are put correctly 2014-08-27 11:04:51 +01:00
Brian Murphy 6109ec36b5 Indexed Scripts : Change preference and thread option for GetRequest.
This change forces the GetRequest when a script is being loaded from an index
to use preference("_local") and threaded(false) to prevent the script service from
forking for GetRequests.
2014-08-27 10:45:53 +01:00
Simon Willnauer 5453c08f50 Use physical name to compare files from snapshot metadata
The comparison and read code in the BlobStoreIndexShardRepository
used the physicalName and Name in reverse order. This caused
SnapshotBackwardsCompatibilityTest to fail.

This reverts commit 636af40da1
2014-08-27 10:47:19 +02:00
Cristiano Fontes ee46c3cd3f Mappings: Added support for empty field arrays
Close #7271
2014-08-27 10:17:05 +02:00
Martijn van Groningen b6cdb1d8fb Parent/child: Add missing support for the field data loading option to the `_parent` field.
Closes #7394
Closes #7402
2014-08-27 09:04:42 +02:00
Martijn van Groningen d414d89c62 Parent/child: If _parent field points to a non existing parent type, then skip the has_parent query/filter
Closes #7362
Closes #7349
2014-08-27 09:00:51 +02:00
Boaz Leskes 8a94044b69 [Test] testLargeClusterStatePublishing - bound max shard no to number of nodes and set replica count to 0
ensureGreen sometimes times out due to too many shards and GC kicking in
2014-08-27 08:34:19 +02:00
Ryan Ernst 1804f864d5 Internal: Add all unsafe variants of LZF compress library functions to forbidden APIs.
The "optimized" encoders/decoders have been unreliable and error prone.
Also, fix LZFCompressor.compress to use LZFEncoder.safeEncode, which
creates a new safe encoder, instead of using a shared encoder (which
is not threadsafe).

closes #7468
2014-08-26 20:17:07 -07:00
Ryan Ernst c94c13fa26 Revert part of change in #7466 to fix issue because encoder is not threadsafe so cannot be shared 2014-08-26 14:04:59 -07:00
Ryan Ernst d79c79c7d0 Internal: Add LZF safe encoder in LZFCompressor
Selecting the safe encoder fixes a 64bit JVM crash on big-endian architectures with
LZF UnsafeChunkEncoderBE.

closes #7466
2014-08-26 13:38:03 -07:00
Adrien Grand 636af40da1 Tests: Temporarily ignore SnapshotBackwardsCompatibilityTest 2014-08-26 18:13:36 +02:00
Adrien Grand 7623c5e401 Tests: Fix FileBasedMappingsTests by using the mappings API instead of field mappings. 2014-08-26 17:54:11 +02:00
Boaz Leskes 35b98f5c24 [Test] rewrite testNoMasterActions to use latest tooling
The test's timeout checks were thrown off by a client created randomly (when the timer was running).

Closes #7432
2014-08-26 17:48:24 +02:00
Britta Weber b754d2b36b Test: mute test until we know what is going on 2014-08-26 15:42:24 +02:00
Simon Willnauer c63626b537 [SNAPSHOT] Add BWC layer to .si / segments_N hashing
Due to additional safety added in #7351 we compute now a strong hash for
.si and segments_N files which are compared during snapshot / restore.
Old snapshots don't have this hash which can cause unnecessary copying
of large amount of data. This commit adds the ability to fetch this
hash from the blob store if needed.

Closes #7434
2014-08-26 15:36:46 +02:00