Commit graph

61175 commits

Author SHA1 Message Date
Craig Taverner
0c9608864f
Updated release notes for 7.17.13 BC1 (#99047) 2023-09-01 11:06:46 +02:00
Mark Vieira
2b211dbb8b
Fix periodic Java matrix jobs to use correct JVM 2023-08-30 12:05:32 -07:00
Albert Zaharovits
82490eb237
Free up allocated buffers in Netty4HttpServerTransportTests (#99005) (#99037)
Closes #98869
2023-08-30 04:47:25 -04:00
Tim Vernum
9d448a0f95
Introduce FilterRestHandler (#98922)
RestHandler has a number of methods that affect the behaviour of request
processing. If the handler is wrapped (e.g. SecurityRestFilter or
DeprecationRestHandler) then these methods must be delegated to the
underlying handler.

This commit introduces a new abstract base class `FilterRestHandler`
that correctly delegates these methods so that wrappers (subclasses) do
not need to implement the behaviour on a case-by-case basis

Backport of: #98861
2023-08-30 07:19:47 +10:00
Brian Seeders
a95036757b
[7.17] [buildkite] Add Windows packaging and platform support tests to periodic pipeline (#98072) (#98329)
* [buildkite] Add Windows packaging and platform support tests to periodic pipeline (#98072)

(cherry picked from commit dfadca83f6)
2023-08-28 13:26:12 -04:00
Mark Vieira
97d53db48c
Add Java 21 to testing matrix 2023-08-28 09:23:30 -07:00
Iraklis Psaroudakis
f7af19baaa
Fix autoexpand during node replace (#98891)
Prior to this change NodeReplacementAllocationDecider was unconditionally skipping both replacement source and target nodes when calculation auto-expand replicas. This is fixed by autoexpanding to the replacement node if source node already had shards of the index

Backport of PR #96281 amended for 7.17.x

Closes #89527

Co-authored-by: Ievgen Degtiarenko <ievgen.degtiarenko@elastic.co>
2023-08-28 10:15:54 +03:00
Albert Zaharovits
0df52c8f67
Netty4 HTTP authn enhancements (#92220) (#96703)
This is a backport of multiple work items related to authentication enhancements for HTTP,
which were originally merged in the 8.8 - 8.9 releases.
Hence, the HTTP (only the netty4-based implementation (default), not the NIO one) authentication
implementation gets a throughput boost (especially for requests failing authn).

Relates to: ES-6188 #92220 #95112
2023-08-23 18:52:38 +03:00
David Turner
fe18a67f02
Make TransportAddVotingConfigExclusionsAction retryable (#98568)
The docs for this API say the following:

> If the API fails, you can safely retry it. Only a successful response
> guarantees that the node has been removed from the voting
> configuration and will not be reinstated.

Unfortunately this isn't true today: if the request adds no exclusions
then we do not wait before responding. This commit makes the API wait
until all exclusions are really applied.

Backport of #98386, plus the test changes from #98146 and #98356.
2023-08-17 04:49:03 -04:00
Volodymyr Krasnikov
bb57a0c81a
Increase timeout for waiting for the cleanup of the shared index folder (#98302) 2023-08-09 07:16:25 -07:00
Nikolaj Volgushev
83e916a9ec
Resolve conflict (#98311)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-08-09 09:45:25 -04:00
Slobodan Adamović
6f66c75c99
[7.17] Enhance regex performance with duplicate wildcards (#98176) (#98277)
This change avoids unnecessary substring allocations and recursion calls
when more than two consecutive wildcards (`*`) are detected. Instead
skipping and calling a method recursively, we now try to skip all
consecutive `*` chars at once.
2023-08-08 14:34:05 +02:00
David Kilfoyle
842e8a410b
[Docs] Fix links to Cloud snapshot and restore docs (#98228) (#98232) 2023-08-04 18:20:15 -04:00
David Kilfoyle
31c912703f
Fix link to removed Cloud snapshot and restore page (#98210) (#98211)
* Fix link to removed Cloud snapshot and restore page

* Add another similar link
2023-08-04 16:27:52 -04:00
Brian Seeders
1b6be92751
Add java-matrix and java-fips-matrix Buildkite pipelines (#97253) (#98040) 2023-07-28 17:50:19 -04:00
Jake Landis
2e2f3ad01a
[7.17] Update certs for PKI tests and re-enable tests (#97766) (#97988)
* Update certs for PKI tests and re-enable tests (#97766)

The certs for the PKI tests expired and the test was muted.
This commit follows the instructions in the read to update the certs and unmutes the test.
The certs will now expire 20 years from now.

fixes: #97756

* precommit
2023-07-26 20:52:17 -04:00
Alan Woodward
ce1a67b8d5
Fix bug in NestedUtils.partitionByChildren() (#97970) (#97986)
If multiple fields appeared between two child scopes, the following children
would be incorrectly assigned to the parent scope.
2023-07-26 15:54:58 -04:00
Przemyslaw Gomulka
fbdb9cd6a8
Add Configuration to PatternLayout backport(97679) (#97971)
in 2.17.2 (patch release) log4j has made a refactoring that requires a Configuration to be manually passed into the created PatternLayout
If the Configuration is not passed, the System Variable lookup will not work This results in cluster.name field not being populated in logs

This commit creates a PatternLayout with a DefaultConfiguration (the same was used previous to the refactoring)

backports #97679
2023-07-26 17:51:43 +02:00
Abdon Pijpelink
f9b064e463
[DOCS] Remove 'coming in 7.17.12' from release notes (#97965)
This PR removes an out-dated "coming" note.
2023-07-26 16:23:28 +02:00
Andrei Dan
f0b7122b16
[7.17] Migrate to data tiers routing configures correct default for mounted indices (#97950)
* Migrate to data tiers routing configures correct default for mounted indices

(cherry picked from commit eaec9602a9c4a4b092f36fd35f58d1e4b8faca52)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>

* Add isExplicitDataTier method back as it's used in 7.17

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-07-26 05:11:10 -04:00
Ryan Ernst
0c21da5ef7
Prune changelogs after 7.17.12 release 2023-07-25 11:26:03 -07:00
Ryan Ernst
fe8d4a23ae
Bump versions after 7.17.12 release 2023-07-25 11:24:15 -07:00
Alan Woodward
72eb60953a
Refactor nested field handling in FieldFetcher (#97683) (#97897)
The current recursive nested field handling implementation in FieldFetcher
can be O(n^2) in the number of nested mappings, whether or not a nested
field has been requested or not. For indexes with a very large number of
nested fields, this can mean it takes multiple seconds to build a FieldFetcher,
making the fetch phase of queries extremely slow, even if no nested fields
are actually asked for.

This commit reworks the logic so that building nested fetchers is only
O(n log n) in the number of nested mappers; additionally, we only pay this
cost for nested fields that have been requested.
2023-07-25 13:45:53 +01:00
Ryan Ernst
92403f7d56
Add release notes for 7.17.12 release (#97864) 2023-07-25 06:54:33 -04:00
Iraklis Psaroudakis
e3b0c3d3c5
Mute some PkiAuthDelegationIntegTests (#97774) (#97779)
Relates #97772
2023-07-19 04:58:31 -04:00
Mark Vieira
ca0aa27289
Upgrade bundle JDK to Java 20.0.2 (#97758) (#97762)
# Conflicts:
#	gradle/verification-metadata.xml

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-07-18 20:22:23 -04:00
Mark Vieira
df7528e88c
Fix import 2023-07-18 16:27:47 -07:00
Ryan Ernst
b526892f24
Muting pki tests until expired test certs are regenerated (#97757)
see https://github.com/elastic/elasticsearch/issues/97756
2023-07-18 16:08:27 -07:00
Mark Vieira
0c1c6ffec8
Mute SecurityDocumentationIT.testDelegatePkiAuthentication 2023-07-18 10:34:48 -07:00
Ignacio Vera
a5433e375d
[7.17] Support for Byte and Short as vector tiles value tag (#97619) (#97673)
* Port lucene fix github-12352 to Elasticsearch 7.17

* Update docs/changelog/96721.yaml

* Support for Byte and Short as vector tiles value tag (#97619)

Byte and short data types are not supported by the vector tiles specification. If a user tries to add one of those, it
 actually gets ignored. This add s support to those values by casting them as integers. In addition it will throw an
exception if the value added is a type it cannot understand so it is not silently ignored.
# Conflicts:
#	x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/vector-tile/10_basic.yml
2023-07-13 21:59:53 -04:00
David Turner
d4069ef08c
Add note on troubleshooting laggy cancellations (#97485) (#97499)
Today we document that tasks may not react to cancellations immediately,
but in practice it's surprising to users and kind of a bug if they run
for too long after being cancelled. This commit adds a little extra
detail about the information to collect to troubleshoot such a
situation.
2023-07-10 07:09:36 -04:00
Artem Prigoda
7d11e4163b
[7.17] Preserve context in ResultDeduplicator (#84038) (#96868)
Today the `ResultDeduplicator` may complete a collection of listeners in
contexts different from the ones in which they were submitted. This
commit makes sure that the context is preserved in the listener.

Co-authored-by: David Turner <david.turner@elastic.co>
2023-07-05 11:00:52 +02:00
Nhat Nguyen
9bb69a21ff
Fix delay timeout in MockTransportService (#97336) (#97338)
We can pass an invalid duration to TimeValue, which accepts either -1 or
an non-negative duration.
2023-07-03 17:40:31 -04:00
David Turner
4ccdcce2b3
[7.17] Handle failure in TransportUpdateAction#handleUpdateFailureWithRetry (#97290) (#97326)
* Handle failure in TransportUpdateAction#handleUpdateFailureWithRetry (#97290)

Here executor(request.getShardId()) may throw, but we're already handling a failure so we cannot simply let this exception bubble up. This commit adjusts things to catch the exception, using it to fail the listener.

Closes #97286

* Fix

---------

Co-authored-by: Iraklis Psaroudakis <kingherc@gmail.com>
2023-07-03 13:31:41 -04:00
Craig Taverner
3bdd3fc6ed
Incorrect name for sort field (#97328) (#97330) 2023-07-03 11:22:37 -04:00
Mark Tozzi
29ff32e276
Less jank in after-key parsing for unmapped fields (#86359) (#97282)
Resolves #85928

The after-key parsing is pretty weird, and there are probably more bugs there. I did not take the opportunity to refactor the whole thing, but we should. This fixes the immediate problem by treating after keys as bytes refs when we don't have a field but think we want a keyword. We were already doing that if the user asked for a missing bucket, this just extends the behavior in the case that we don't.

Long term, the terms Composite source (and probably other Composite sources) should have specializations for unmapped fields. That's the direction we want to take aggs in general.
2023-07-03 09:57:14 -04:00
Slobodan Adamović
22ca339c4d
[7.17][DOC] Consistently reference indices parameter in API key examples (#97268)
Backports the following commits to 7.17:  - [DOC] Consistently reference
indices parameter in API key examples (#97174)
2023-06-30 04:03:59 -04:00
Lee Hinman
3ab042504d
Bump Guava from 30.1-jre to 32.0.1-jre (#97211) (#97255)
This bumps Watcher's Guava dependency to 32.0.1.
2023-06-29 17:01:21 -04:00
Mark Vieira
04101331ac
Prune changelogs after 7.17.11 release 2023-06-29 13:31:44 -07:00
Mark Vieira
6a55b8789e
Bump versions after 7.17.11 release 2023-06-29 13:30:37 -07:00
Joe Gallo
23703cae8b
Add release notes for 7.17.11 release (#97057)
* Add release notes for 7.17.11 release

* Add release notes for 7.17.11 release

* Revert "Add release notes for 7.17.11 release"

This reverts commit 924cc1619b.
2023-06-29 09:31:34 +02:00
David Turner
e1c90fa8e4
Remove linebreak from #75598 known-issue docs (#97216)
Linebreaks in `preformatted text` are preserved in the rendered docs,
which is not what we want here.
2023-06-29 08:17:36 +01:00
Volodymyr Krasnikov
32deaf9ff0
Update Guava dependency version to 32.0.1-jre (#97060)
* Update Guava dependency version to 32.0.1-jre

* Fix dependencies

* Remove direct dependencies on guava ver.31

* Revert "Remove direct dependencies on guava ver.31"

This reverts commit 1e90a271c2.
2023-06-27 11:09:50 -07:00
Ryan Ernst
537a1c9bda
Capture max processors in static init (#97119) (#97153)
The number of processors available to the jvm can change over time.
However, most of Elasticsearch assumes this value is constant. Although
we could rework all code relying on the number of processors to
dynamically support updates and poll the jvm, doing so has little value
since the processors changing is an edge case. Instead, this commit
fixes validation of the node.processors setting (our internal number of
processors) to validate based on the max processors available at launch.

closes #97088
2023-06-27 12:47:29 -04:00
Joe Gallo
62579b0062
Fix unhandled exception when blobstore repository contains unexpected file (#93914) (#97113)
If there's any file with the `index-` prefix but not a number after that at the repo root we
must not throw here. If we do, we will end up throwing an unexpected exception that is not
properly handled by `org.elasticsearch.snapshots.SnapshotsService#failAllListenersOnMasterFailOver`,
leading to the repository generation not getting correctly set in the cluster state down the line.
2023-06-27 10:04:22 -04:00
Joe Gallo
6cd68fc2f0
[7.17] Clarify index template settings precedence (#87374) (#97121)
[docs] Clarify that index template settings take precedence over component templates.

Co-authored-by: Toby Sutor <55087308+toby-sutor@users.noreply.github.com>
Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
Co-authored-by: Adam Locke <adam.locke@chronosphere.io>
2023-06-27 09:29:56 -04:00
Iraklis Psaroudakis
2a3d71b1e8
Upgrade Netty to 4.1.94.Final (#97114)
Backport of https://github.com/elastic/elasticsearch/pull/97112
2023-06-26 12:05:24 -04:00
Przemysław Witek
68092d0fc4
[7.17] [Transform] Adding null check to fix potential NPE (#96785) (#97109) 2023-06-26 16:39:25 +02:00
Tanguy Leroux
4e3cc9bc0f
[7.17] Fix ESCCRRestTestCase.verifyAutoFollowMonitoring (#97054) (#97105)
The method `verifyAutoFollowMonitoring` searches for
`ccr_auto_follow_stats` documents in `monitoring-es-*` indices to see if
one document has the field `number_of_successful_follow_indices` greater
than 0.

If such document is found, it means that x-pack monitoring successfully
indexed documents about CCR stats and that CCR at that time had at least
1 following index successfully running.

But the current `verifyAutoFollowMonitoring` method only check the first
10 docs returned by the search requests. Recent failures of
`AutoFollowIT.testAutoFollowPatterns` on 7.17 branch indicates that more
than 10 docs were found, so I suspect one of them has
`number_of_successful_follow_indices` > 0 but is not returned in the
first 10 top docs.

This pull request changes the method to only count documents with
`number_of_successful_follow_indices` > 0.

Closes #91984
2023-06-26 08:46:57 -04:00
David Turner
eeedb98c60
Make cluster health API cancellable (#96990)
This API can be quite heavy in large clusters, and might spam the
`MANAGEMENT` threadpool queue with work for clients that have long-since
given up. This commit adds some basic cancellability checks to reduce
the problem.

Backport of #96551 to 7.17
2023-06-22 08:05:03 +01:00