Commit Graph

44636 Commits

Author SHA1 Message Date
Albert Zaharovits 85311c3b2a
Do not create the missing index when invoking getRole (#39039)
In most of the places we avoid creating the `.security` index (or updating the mapping)
for read/search operations. This is more of a nit for the case of the getRole call,
that fixes a possible mapping update during a get role, and removes a dead if branch
about creating the `.security` index.
2019-02-20 15:32:35 +02:00
Nhat Nguyen 4a6b8c5416
Relax history check in ShardFollowTaskReplicationTests (#39162)
The follower won't always have the same history as the leader for its
soft-deletes retention can be different. However, if some operation
exists on the history of the follower, then the same operation must
exist on the leader. This change relaxes the history check in
ShardFollowTaskReplicationTests.

Closes #39093
2019-02-20 08:10:29 -05:00
Nhat Nguyen 8d9b3918b6
Add retention leases replication tests (#38857)
This commit introduces the retention leases to ESIndexLevelReplicationTestCase,
then adds some tests verifying that the retention leases replication works
correctly in spite of the presence of the primary failover or out of order
delivery of retention leases sync requests.

Relates #37165
2019-02-20 08:08:27 -05:00
Darren Meiss 8daf793cf1 Edits to text in Phrase Suggester doc (#38966) 2019-02-20 13:12:49 +01:00
Darren Meiss be7fa87cf2 Edits to text in API Conventions docs (#39001) 2019-02-20 13:12:49 +01:00
Jason Tedor ae7b946bbc
Remove retention leases when unfollowing (#39088)
This commit attempts to remove the retention leases on the leader shards
when unfollowing an index. This is best effort, since the leader might
not be available.
2019-02-20 07:05:47 -05:00
Mayya Sharipova 3260fd1fc8
Distance measures for dense and sparse vectors (#37947)
* Distance measures for dense and sparse vectors

Introduce painless functions of
cosineSimilarity and dotProduct distance
measures for dense and sparse vector fields.

```js
{
  "query": {
    "script_score": {
      "query": {
        "match_all": {}
      },
      "script": {
        "source": "cosineSimilarity(params.queryVector, doc['my_dense_vector'].value)",
        "params": {
          "queryVector": [4, 3.4, -1.2]
        }
      }
    }
  }
}
```

```js
{
  "query": {
    "script_score": {
      "query": {
        "match_all": {}
      },
      "script": {
        "source": "cosineSimilaritySparse(params.queryVector, doc['my_sparse_vector'].value)",
        "params": {
          "queryVector": {"2": -0.5, "10" : 111.3, "50": -13.0, "113": 14.8, "4545": -156.0}
        }
      }
    }
  }
}
```

Closes #31615
2019-02-20 07:01:17 -05:00
Darren Meiss 12006ea29a Fix a typo in the cat shards API docs (#38536) 2019-02-20 11:37:27 +01:00
Darren Meiss ff87932c21 Edits to text in Bulk API doc (#39083) 2019-02-20 11:34:36 +01:00
Darren Meiss 34b4262302 Edits to text in Multi Get API doc (#39082) 2019-02-20 11:34:36 +01:00
Darren Meiss f14235c94f Edits to text in Update By Query API doc (#39078) 2019-02-20 11:34:36 +01:00
Darren Meiss 73ccf819aa Edits to text in Update API doc (#39069) 2019-02-20 11:34:36 +01:00
Darren Meiss 9b8a1665ff Edits to text in Delete By Query API doc (#39017) 2019-02-20 11:34:36 +01:00
Darren Meiss cb044312e9 Edits to text in Index API doc (#39010) 2019-02-20 11:34:36 +01:00
Adrien Grand 29caf477b6
Reenable test in `indices.put_mapping/20_mix_typeless_typeful.yml`. (#39056)
This test had been disabled because of test failures, but it only affected the
6.x branch. The fix for 6.x is at #39054. On master/7.x/7.0 we can reenable the
test as-is.
2019-02-20 11:32:53 +01:00
Andrei Stefan 822a21f294
SQL: enforce JDBC driver - ES server version parity (#38972) 2019-02-20 11:25:25 +02:00
Andrei Stefan 38fbf9792b
Added "validate.properties" property to JDBC's list of allowed properties. (#39050)
This defaults to "true" (current behavior) and will throw an exception
if there is a property that cannot be recognized. If "false", it will
ignore anything unrecognizable.
2019-02-20 11:23:47 +02:00
David Turner a462220297
Simplify calculation in AwarenessAllocationDecider (#38091)
Today's calculation of the maximum number of shards per attribute is rather
convoluted. This commit clarifies that it returns
ceil(shardCount/numberOfAttributes).
2019-02-20 08:55:04 +00:00
Ioannis Kakavas abefbc0cd9 Re-enable testTriggeredWatchLoading
There is a strong indication that the test was originally failing
for the same reason as testLoadExistingWatchesUponStartup. This was
fixed in #39092 and the cause is explained in
https://github.com/elastic/elasticsearch/pull/39092/files#r257895150
2019-02-20 09:56:04 +02:00
Henning Andersen f5fc163228
Blob store compression fix (#39073)
Blob store compression was not enabled for some of the files in
snapshots due to constructor accessing sub-class fields. Fixed to
instead accept compress field as constructor param. Also fixed chunk
size validation to work.

Deprecated repositories.fs.compress setting as well to be able to unify
in a future commit.
2019-02-20 08:27:07 +01:00
Armin Braun 18c5f93c0f
Add Checks for Closed Channel in Selector Loop (#39096)
* A few warnings could be observed in test logs about `NoSuchElementException` being thrown in `InboundChannelBuffer#sliceBuffersTo`.
These were the result of calls to this method after the relevant channel and hence the buffer was closed already as a result of a failed IO operation.
  * Fixed by adding the necessary guard statements to break out in these cases. I don't think there is a need here to do any additional error handling since `eventHandler.postHandling(channelContext);` at the end of the `processKey`
call in the main selection loop handles closing channels and invoking callbacks for writes that failed to go through already.
2019-02-20 05:33:35 +01:00
Julie Tibshirani 5eef4added Enable test logging for TransformIntegrationTests#testSearchTransform.
There is already fairly detailed debug logging in the watcher framework, which
should hopefully help debug the failure.

Relates to #37882.
2019-02-19 17:40:39 -08:00
Jake Landis 6aafe47191
stronger wording for ilm+rollover in docs (#39159) 2019-02-19 17:58:29 -06:00
Jack Conradson 92f7b9ef31
Mute SingleNodeTests (#39156)
Relates to #36782
2019-02-19 14:20:57 -08:00
Tal Levy 2d5649d088 AwaitsFix XPackUsageIT#testXPackCcrUsage.
relates to #39126.
2019-02-19 13:28:13 -08:00
Tim Vernum e694473de4
Resolve concurrency with watcher trigger service (#39092)
The watcher trigger service could attempt to modify the perWatchStats
map simultaneously from multiple threads. This would cause the
internal state to become inconsistent, in particular the count()
method may return an incorrect value for the number of watches.

This changes replaces the implementation of the map with a
ConcurrentHashMap so that its internal state remains consistent even
when accessed from mutiple threads.

Resolves: #39087
2019-02-20 08:27:14 +11:00
Igor Motov bb796b33e4
Fix median calculation in MedianAbsoluteDeviationAggregatorTests (#38979)
Fixes an error in median calculation in
MedianAbsoluteDeviationAggregatorTests for odd number of sample points,
which causes some rare test failures.

Fixes #38937
2019-02-19 16:02:11 -05:00
Lisa Cawley a3c44c0270
[DOCS] Edits the remote clusters documentation (#38996) 2019-02-19 11:53:35 -08:00
Hendrik Muhs 1aa10c4b27 add version 6.6.2 2019-02-19 20:28:49 +01:00
Lee Hinman f9d11ca152
Revert "Mute failing test 20_mix_typless_typefull (#38781)" (#38912)
This reverts commit b91e0589fe.

This should be fixed by #38873

Resolves #38711
2019-02-19 12:15:44 -07:00
Tim Brooks a5cbef9d1b
Rebuild remote connections on profile changes (#37678)
Currently remote compression and ping schedule settings are dynamic.
However, we do not listen for changes. This commit adds listeners for
changes to those two settings. Additionally, when those settings change
we now close existing connections and open new ones with the settings
applied.

Fixes #37201.
2019-02-19 11:32:21 -07:00
Lee Hinman 237d7559bb
Document 'max_size' parameter as shard size for rollover (#38750)
It was not clear that this is *primary* shard size, not the entire shard size.

Resolves #37981
2019-02-19 10:54:15 -07:00
David Turner 8864c9fcd2
Add some missing toString() implementations (#39124)
Sometimes we turn objects into strings for logging or debugging using
`toString()`, but the default implementation is often unhelpful. This change
improves on this in two places I ran into recently.
2019-02-19 17:52:25 +00:00
Like 106f59012d Migrate Streamable to Writeable for cluster block package (#37391) 2019-02-19 09:44:07 -08:00
Tal Levy 97efec36e1
fix RethrottleTests retry (#38978)
the RethrottleTests assumed that tasks that were
unprepared to rethrottle would bubble up into the
Rethrottle response as an ElasticsearchException
wrapping an IllegalArgumentException. This seems to
have changed to potentially involve further levels of
wrapping.

This change makes the retry logic more resilient to
arbitrary nesting of the underlying IllegalArgumentException
2019-02-19 09:37:02 -08:00
Ioannis Kakavas 040922831f
Disable date parsing test in non english locale (#39052)
This ensures we do not attempt to parse non english locale dates
in FIPS mode. The error, originally assumed to affect only Joda,
affects Java time in the same manner and manifests only with the
version of BouncyCastle FIPS certified provider we use in tests.
The upstream issue https://github.com/bcgit/bc-java/issues/405
indicates that the behavior is resolved in later versions of the
BouncyCastle library and should be tested again when the new
versions become FIPS 140 certified
2019-02-19 19:31:25 +02:00
Ioannis Kakavas 97971380bd
Remove BCryptTests (#39098)
This test was added to verify that we fixed a specific behavior in
Bcrypt and hasn't been running for almost 4 years now.
2019-02-19 17:43:24 +02:00
David Roberts ed98ee087b
[ML] Stop the ML memory tracker before closing node (#39111)
The ML memory tracker does searches against ML results
and config indices.  These searches can be asynchronous,
and if they are running while the node is closing then
they can cause problems for other components.

This change adds a stop() method to the MlMemoryTracker
that waits for in-flight searches to complete.  Once
stop() has returned the MlMemoryTracker will not kick
off any new searches.

The MlLifeCycleService now calls MlMemoryTracker.stop()
before stopping stopping the node.

Fixes #37117
2019-02-19 15:11:10 +00:00
Jason Tedor 92ef753b56
Allow retention lease operations under blocks (#39089)
This commit allows manipulating retention leases under blocks.
2019-02-19 09:53:36 -05:00
Benjamin Trent 4acb50fd1c
ML refactor DatafeedsConfig(Update) so defaults are not populated in queries or aggs (#38822)
* ML refactor DatafeedsConfig(Update) so defaults are not populated in queries or aggs

* Addressing pr feedback
2019-02-19 08:46:46 -06:00
Jason Tedor 44fc57f07d
Fix retention leases sync on recovery test
This test had a bug. We attempt to allow only the primary to be
allocated, to force all replicas to recovery from the primary after we
had set the state of the retention leases on the primary. However, in
building the index settings, we were overwriting the settings that
exclude the replicas from being allocated. This means that some of the
replicas would end up assigned and rather than receive retention leases
during recovery, they would be part of the replication group receiving
retention leases as they are manipulated. Since retention lease renewals
are only synced periodically, this means that the replica could be
lagging a little behind in some cases leading to an assertion tripping
in the test. This commit addresses this by ensuring that the replicas
are indeed not allocated until after the retention leases are done being
manipulated on the replica. We did this by not overwriting the exclude
settings.

Closes #39105
2019-02-19 08:56:10 -05:00
David Roberts fbabd81e3d
[ML] Allow stop unassigned datafeed and relax unset upgrade mode wait (#39034)
These two changes are interlinked.

Before this change unsetting ML upgrade mode would wait for all
datafeeds to be assigned and not waiting for their corresponding
jobs to initialise.  However, this could be inappropriate, if
there was a reason other that upgrade mode why one job was unable
to be assigned or slow to start up.  Unsetting of upgrade mode
would hang in this case.

This change relaxes the condition for considering upgrade mode to
be unset to simply that an assignment attempt has been made for
each ML persistent task that did not fail because upgrade mode
was enabled.  Thus after unsetting upgrade mode there is no
guarantee that every ML persistent task is assigned, just that
each is not unassigned due to upgrade mode.

In order to make setting upgrade mode work immediately after
unsetting upgrade mode it was then also necessary to make it
possible to stop a datafeed that was not assigned.  There was
no particularly good reason why this was not allowed in the past.
It is trivial to stop an unassigned datafeed because it just
involves removing the persistent task.
2019-02-19 13:47:47 +00:00
Alexander Reelsen 01d6263a74
Fix DateFormatters.parseMillis when no timezone is given (#39100)
The parseMillis method was able to work on formats without timezones by
falling back to UTC. The Date Formatter interface did not support this, as
the calling code was using the `Instant.from` java time API.

This switches over to an internal method which adds UTC as a timezone.

Closes #39067
2019-02-19 14:11:52 +01:00
Hendrik Muhs a54d1c61f5 mute testDelayedMappingPropagationOnReplica 2019-02-19 13:36:26 +01:00
Armin Braun a459cb0ad8
Don't Ping on Handshake Connection (#39076)
* Don't Ping on Handshake Connection

* It does not make sense to run pings on the handshake connection
   * Set the ping interval to `-1` to deactivate pings on it
2019-02-19 12:20:47 +01:00
Alan Woodward 3f8e022988
Adjust backwards-compatibility versions for before,after,overlapping interval filters (#39062)
Follow up to #38999, this commit re-enables backwards-compatibility REST tests
for `before`, `after` and `overlapping` filters against versions 7.1 and up.
2019-02-19 10:11:01 +00:00
Adrien Grand bc2fe70e55
Don't swallow IOExceptions in InternalTestCluster. (#39068)
Relates #39030
2019-02-19 11:02:22 +01:00
David Turner 87bb5d0872
repository-s3 also works with S3-compatibles (#38524)
- Notes that you can adjust the `s3.client.*.endpoint` setting to point to a
  repository held on an S3-compatible service.
- Notes that the default is `s3.amazonaws.com` and not to auto-detect the
  endpoint.
- Reformats docs to width.

Closes #35925
2019-02-19 10:00:46 +00:00
Hendrik Muhs df60f6866a add debug info for intermittent test failure 2019-02-19 10:55:11 +01:00
Jim Ferenczi f3e8d66ffb
Remove beta marker from the synonym_graph docs (#38185) 2019-02-19 10:47:59 +01:00