Commit graph

132 commits

Author SHA1 Message Date
Ryan Ernst
e6713a5c0a
Remove JNA from server dependencies (#110809)
All native methods are now bound through NativeAccess. This commit
removes the jna dependency from server.

relates #104876
2024-07-12 19:49:13 -07:00
Ryan Ernst
7d8aac3a3e
Implement custom JUL bridge (#96872)
The log4j JUL bridge turned out to have issues because it relied on java
beans. This commit implements a custom bridge between JUL and Log4j.

closes #94613
2023-06-20 09:48:25 -07:00
Przemyslaw Gomulka
31e20d9239
Revert "Add JUL bridge (#96683)" (#96832)
This reverts commit 2bdf1bc0d6.
2023-06-14 14:37:53 +02:00
Ryan Ernst
2bdf1bc0d6
Add JUL bridge (#96683)
This commit adds the Log4j JUL bridge so that messages using JUL are
more nicely converted to log4j messages. Currently these messages are
captured via the stdout logging stream. This commit also adds a log4j
filter to replace the logging stream filtering mechanism used to quiet
some Lucene log messages that may be confusing to users.

closes #94613
2023-06-13 19:31:05 -04:00
Kostas Krikellas
67211be81d
Fork TDigest library (#96086)
* Initial import for TDigest forking.

* Fix MedianTest.

More work needed for TDigestPercentile*Tests and the TDigestTest (and
the rest of the tests) in the tdigest lib to pass.

* Fix Dist.

* Fix AVLTreeDigest.quantile to match Dist for uniform centroids.

* Update docs/changelog/96086.yaml

* Fix `MergingDigest.quantile` to match `Dist` on uniform distribution.

* Add merging to TDigestState.hashCode and .equals.

Remove wrong asserts from tests and MergingDigest.

* Fix style violations for tdigest library.

* Fix typo.

* Fix more style violations.

* Fix more style violations.

* Fix remaining style violations in tdigest library.

* Update results in docs based on the forked tdigest.

* Fix YAML tests in aggs module.

* Fix YAML tests in x-pack/plugin.

* Skip failing V7 compat tests in modules/aggregations.

* Fix TDigest library unittests.

Remove redundant serializing interfaces from the library.

* Remove YAML test versions for older releases.

These tests don't address compatibility issues in mixed cluster tests as
the latter contain a mix of older and newer nodes, so the output depends
on which node is picked as a data node since the forked TDigest library
is not backwards compatible (produces slightly different results).

* Fix test failures in docs and mixed cluster.

* Reduce buffer sizes in MergingDigest to avoid oom.

* Exclude more failing V7 compatibility tests.

* Update results for JdbcCsvSpecIT tests.

* Update results for JdbcDocCsvSpecIT tests.

* Revert unrelated change.

* More test fixes.

* Use version skips instead of blacklisting in mixed cluster tests.

* Switch TDigestState back to AVLTreeDigest.

* Update docs and tests with AVLTreeDigest output.

* Update flaky test.

* Remove dead code, esp around tracking of incoming data.

* Update docs/changelog/96086.yaml

* Delete docs/changelog/96086.yaml

* Remove explicit compression calls.

This was added to prevent concurrency tests from failing, but it leads
to reduces precision. Submit this to see if the concurrency tests are
still failing.

* Revert "Remove explicit compression calls."

This reverts commit 5352c96f65.

* Remove explicit compression calls to MedianAbsoluteDeviation input.

* Add unittests for AVL and merging digest accuracy.

* Fix spotless violations.

* Delete redundant tests and benchmarks.

* Fix spotless violation.

* Use the old implementation of AVLTreeDigest.

The latest library version is 50% slower and less accurate, as verified
by ComparisonTests.

* Update docs with latest percentile results.

* Update docs with latest percentile results.

* Remove repeated compression calls.

* Update more percentile results.

* Use approximate percentile values in integration tests.

This helps with mixed cluster tests, where some of the tests where
blocked.

* Fix expected percentile value in test.

* Revert in-place node updates in AVL tree.

Update quantile calculations between centroids and min/max values to
match v.3.2.

* Add SortingDigest and HybridDigest.

The SortingDigest tracks all samples in an ArrayList that
gets sorted for quantile calculations. This approach
provides perfectly accurate results and is the most
efficient implementation for up to millions of samples,
at the cost of bloated memory footprint.

The HybridDigest uses a SortingDigest for small sample
populations, then switches to a MergingDigest. This
approach combines to the best performance and results for
small sample counts with very good performance and
acceptable accuracy for effectively unbounded sample
counts.

* Remove deps to the 3.2 library.

* Remove unused licenses for tdigest.

* Revert changes for SortingDigest and HybridDigest.

These will be submitted in a follow-up PR for enabling MergingDigest.

* Remove unused Histogram classes and unit tests.

Delete dead and commented out code, make the remaining tests run
reasonably fast. Remove unused annotations, esp. SuppressWarnings.

* Remove Comparison class, not used.

* Small fixes.

* Add javadoc and tests.

* Remove special logic for singletons in the boundaries.

While this helps with the case where the digest contains only
singletons (perfect accuracy), it has a major issue problem
(non-monotonic quantile function) when the first singleton is followed
by a non-singleton centroid. It's preferable to revert to the old
version from 3.2; inaccuracies in a singleton-only digest should be
mitigated by using a sorted array for small sample counts.

* Revert changes to expected values in tests.

This is due to restoring quantile functions to match head.

* Revert changes to expected values in tests.

This is due to restoring quantile functions to match head.

* Tentatively restore percentile rank expected results.

* Use cdf version from 3.2

Update Dist.cdf to use interpolation, use the same cdf
version in AVLTreeDigest and MergingDigest.

* Revert "Tentatively restore percentile rank expected results."

This reverts commit 7718dbba59.

* Revert remaining changes compared to main.

* Revert excluded V7 compat tests.

* Exclude V7 compat tests still failing.

* Exclude V7 compat tests still failing.

* Restore bySize function in TDigest and subclasses.
2023-06-13 11:43:54 +03:00
Joe Gallo
582f1be95e
Update log4j2 LICENSE and NOTICE files (#93611) 2023-02-09 08:53:43 -05:00
Rene Groeschke
3909b5eaf9
Add verification metadata for dependencies (#88814)
Removing the custom dependency checksum functionality in favor of Gradle build-in dependency verification support. 

- Use sha256 in favor of sha1 as sha1 is not considered safe these days.

Closes https://github.com/elastic/elasticsearch/issues/69736
2022-08-04 09:51:16 +02:00
Ignacio Vera
ed564f6e1d
Update lo lucene-9.3.0 (#88927) 2022-08-01 07:21:13 +02:00
Ignacio Vera
3b7f393a82
Upgrade to lucene snapshot lucene-9.3.0-snapshot-b8d1fcfd0ec (#88706) 2022-07-22 11:22:39 +02:00
Nhat Nguyen
bd69f90fff
Upgrade to Lucene-9.3.0-snapshot-2d05f5c623e (#88284)
To include LUCENE-10620 - which passes Weight to Collector
2022-07-06 16:16:03 -04:00
Chris Hegarty
453f12c72d
Upgrade to Log4J 2.18.0 (#88237) 2022-07-04 11:30:38 +01:00
Nhat Nguyen
c2dc6e6ef4
Upgrade to new Lucene snapshot (#87932)
This PR uses Lucene-9.3 snapshot in Elasticsearch 8.4. Noticeable changes in this Lucene snapshot:

- Merge-on-refresh (disabled)
- No more pathological merging
- SortedSetDocValues#count for value_count aggs
2022-06-23 12:18:27 -04:00
Ryan Ernst
f5c0be5c89
Move spatial3d dependency to spatial (#87397)
Server depends on spatial3d, but it is only ever used by the spatial
xpack component. This commit moves the dependency there.

closes #87026
2022-06-07 12:54:11 -07:00
Alan Woodward
048fa422c2
Update to public lucene 9.2.0 release (#87162) 2022-06-06 10:06:41 +01:00
Alan Woodward
205cfec52f
Upgrade to lucene 9.2.0-RC2 snapshot (#86931)
Only difference from last snapshot is a revert of a change in the behaviour
of PersianAnalyzer
2022-05-20 08:54:35 +01:00
Alan Woodward
0418e8a9d8
Upgrade to lucene snapshot 978eef5459c (#86852)
Final (hopefully!) snapshot before the 9.2.0 release

* Update test to expect persian tokenfilter - will be exposed later
* Fix KnnVectorQueryBuilderTests::doAssertLuceneQuery

Co-authored-by: Mayya Sharipova <mayya.sharipova@elastic.co>
2022-05-17 15:27:52 -07:00
Alan Woodward
4d076eee20
Upgrade to Lucene 9.2 snapshot efa5d6f4d43 (#86227)
Notable changes include:

count implementations for MultiRangeQuery and IndexSortedNumericDocValuesRangeQuery, which may speed up certain aggregations
more efficient decoding of docids in BKD reader
2022-05-05 15:48:13 +01:00
Ignacio Vera
af2fe8ee33
Upgrade Lucene to 9.1.0 release (#85211) 2022-03-22 14:11:53 +01:00
Alan Woodward
0863fb83d5
Upgrade to lucene 9.1.0-snapshot-5b522487ba8 (#85025)
Specifically includes LUCENE-10469 which should address a performance 
regression in EQL.
2022-03-16 14:58:20 +00:00
Julie Tibshirani
bba2dfac56
Upgrade Lucene to 9.1.0-snapshot-949752 (#84540)
This PR upgrades Lucene to a newer snapshot `9.1.0-snapshot-9497524cc2d`.

Changes:
* Adapt to `LeafReader#searchNearestVectors` signature change
* Adapt checks in `GeometryIndexerTests`, `SearchServiceTests`, `FiltersAggregatorTests`, `AggregationProfilerIT`
* Address highlighting failures in `MultiPhrasePrefixQuery` and `HasChildQueryBuilder.LateParsingQuery`
2022-03-04 08:36:26 -08:00
Mayya Sharipova
26c3dd6857
Upgrade to lucene-9.1.0-snapshot-1336263051c (#83667)
Lucene issues that resulted in elasticsearch changes:

LUCENE-9820 Separate logic for reading the BKD index from logic to intersecting it.
LUCENE-10377: Replace 'sortPos' with 'enableSkipping' in SortField.getComparator()
LUCENE-10301: make the test-framework a proper module by moving all test
classes to org.apache.lucene.tests
LUCENE-10300: rewrite how resources are read in ukrainian morfologik analyzer:
LUCENE-10054 Make HnswGraph hierarchical
2022-02-22 09:53:20 +01:00
Costin Leau
dddff27498
Upgrade to log4j 2.17.1 (#82111)
Upgrade to log4j 2.17.1
2021-12-28 23:33:07 +02:00
Chris Hegarty
1cc69f86fe
Upgrade to log4j 2.17.0 (#81902) 2021-12-18 17:40:36 +00:00
Artem Prigoda
442a13a46d
Upgrade log4j to 2.15.0 (#81709)
Originally we tried to a log4j update in #47298, but we were unable to
that due to the `DeprecationLoggerTests.testLogPermissions` test
failing. The test relied on mocking and got removed in
https://github.com/elastic/elasticsearch/pull/61474/files#diff-70de5a6ba5c637e7f19c51341417760d6e957beb5a1fa5703049095ea2719ee0L47

Now we should be able to the upgrade and then we can address the Security
Manager permission questions raised in #47298 separately.

* Initialize pattern layout with AccessController.doPrivileged

We need the `getClassLoader` permissions

* Disable the SecurityManager for command testing because of `CommandLoggingConfigurator` 
which fails under the `SecurityManager`
2021-12-15 14:31:30 +01:00
Alan Woodward
33ef38e478
Upgrade to released lucene 9.0.0 (#81426)
This commit makes elasticsearch depend on the released artifacts
of lucene 9.0.0, rather than an internal snapshot.
2021-12-07 14:19:56 +00:00
David Turner
e8d8b129ae
Upgrade JNA to 5.10.0 (#80617)
This commit upgrades JNA to 5.10.0. The primary reason for this upgrade
is to adopt a newer version of `libffi` which supports the
`LIBFFI_TMPDIR` environment variable so that we can change the location
of temporary executables and resolve #77014.

This commit also switches to the upstream JNA releases rather than using
the specially-repackaged ones we've used in the past.
2021-11-11 07:20:09 +00:00
Przemyslaw Gomulka
170812143d
Upgrade ECS logging layout to latest version (#80500)
we use ECS layout in 8.x and there is a newer release for ecs logging library
2021-11-10 15:50:23 +01:00
Mayya Sharipova
db0b4ba08a
Upgrade Lucene 9 snapshot cc2a31f2be8 (#80213) 2021-11-02 15:50:33 -04:00
Alan Woodward
dd3227192a
Update lucene 9 snapshot (#79701)
This includes the following changes:

* LUCENE-10180: Avoid using lambdas in SegmentMerger
* LUCENE-10187: Reduce DirectWriter's padding
* LUCENE-10193: Cut over more array access to VarHandles
* LUCENE-10189: Optimize flush of doc-value fields that are effectively single-valued
* LUCENE-10165: Implement Lucene90DocValuesProducer#getMergeInstance
2021-10-25 12:59:43 +01:00
Mayya Sharipova
074b023be5
Upgrade lucene version 8b68bf60c98 (#79461)
This introduces a new 8.10.1 Lucene version for ES 7.16

Also Enable bwc that were disabled in PR#79385
2021-10-19 11:30:41 -04:00
Alan Woodward
13f05358a0
Update to new lucene snapshot (#79138)
Includes the following new commits of interest:

* LUCENE-10150: override readLongs() in ByteBuffersDataInput
* LUCENE-10146: Add VectorSimilarityFunction.COSINE
* LUCENE-10140: Correct minimizing iterator sub-matches
* LUCENE-10103 Make QueryCache respect Accountable queries
* LUCENE-10170: Restore compression speed for LZ4.
2021-10-14 12:25:09 +01:00
Ryan Ernst
208d575e43
Remove Joda dependency (#79007)
This commit removes the dependency on the Joda library. It removes
many remaining references to joda, though not all because some comments
are worthwhile for historical reasoning.
2021-10-13 17:37:31 -07:00
Alan Woodward
b56d72a468
Upgrade to lucene snapshot ba75dc5e6bf (#78817)
Includes the following lucene changes:

* LUCENE-10145: Speed up byte[] comparisons using VarHandles.
* LUCENE-10143: Delegate primitive writes in RateLimitedIndexOutput
* LUCENE-10182: No longer check dvGen.
* LUCENE-10153: Speed up BKDWriter using VarHandles.
* LUCENE-10150: override ByteBuffersDataInput readLong/readInt/readShort
2021-10-07 12:11:25 +01:00
Ignacio Vera
b2e4639d42
Move legacy geo_shape implementation to its own module (#77856)
This commit moves the legacy geo_shape implementation to its own module and removes 
the dependency on Spatial4J / JTS from server.
2021-10-06 08:13:47 +02:00
Alan Woodward
92db6a62c0
Update to new lucene snapshot (#78548)
Includes the following changes:

- Updates to prevent package splits in ES: LUCENE-10118, LUCENE-10132
- Speedups in writing doc values: LUCENE-10127, LUCENE-10123, LUCENE-10125
- Speedups in writing primitives: LUCENE-10125
- Sort-after bugfixes: LUCENE-10126
2021-10-01 12:07:42 +01:00
Nhat Nguyen
7d82dbf9e3
Upgrade to Lucene9-snapshot-94c6e261274 (#78286)
Upgrade to a new Lucene 9 snapshot that includes LUCENE-10119 so we can 
re-enable the sort optimization with points for scroll and search_after
requests.

Relates #78230
2021-09-24 10:46:11 -04:00
Alan Woodward
524d1ea757
Upgrade to lucene-9.0.0-snapshot-32a0a16aff0 (#73324)
This commit upgrades elasticsearch 8.0 to use a snapshot of
Lucene 9.0.0.
2021-09-21 10:48:26 +01:00
Nhat Nguyen
05c25e4b0a
Upgrade to Lucene-8.10.0-snapshot-bf2fcb53079 (#77801)
To include LUCENE-10106.
2021-09-16 12:23:18 -04:00
Tim Brooks
11c6dfc95f
Add LZ4 compressor with Java9 perf improvements (#77153)
Java9 added a number of features that are useful to improve compression
and decompression. These include the Arrays#mismatch method and
VarHandles. This commit adds compression tools forked from the java-lz4
library which include these improvements. We hope to contribute these
changes back to the original project, however the project currently
supports Java7 so this is not possible at the moment.
2021-09-09 12:53:35 -06:00
Nhat Nguyen
174f65ef82
Upgrade to Lucene 8.9.0 (#74729) 2021-06-30 08:49:53 -04:00
Tim Brooks
293d490ded
Add additional transport compression options (#74587)
This commit is related to #73497. It adds two new settings. The first setting
is transport.compression_scheme. This setting allows the user to
configure LZ4 or DEFLATE as the transport compression. Additionally, it
modifies transport.compress to support the value indexing_data. When
this setting is set to indexing_data only messages which are primarily
composed of raw source data will be compressed. This is bulk, operations
recovery, and shard changes messages.
2021-06-29 12:14:47 -06:00
Nhat Nguyen
5efb6eaba6
Update Lucene to 8.9.0-snapshot-ddc238e5df8 (#73568)
Just include LUCENE-9980, which fixes #39591.

Closes #39591
2021-05-31 13:49:29 -04:00
Nhat Nguyen
1764e8ba15
Upgrade to Lucene-8.9.0-SNAPSHOT-efdc43fee18 (#73130)
Upgrades to Lucene-8.9 snapshot which includes:

- LUCENE-9507: Custom order for leaves (/cc @mayya-sharipova)
- LUCENE-9935: Enable bulk merge for stored fields with index sort
2021-05-17 09:37:20 -04:00
Przemyslaw Gomulka
b0a0d56bbe
Update joda dependency to latest 2.10.10 (#72052)
Latest JDKs are shipping with timezone data 2021a which is also included
in latest joda. In order to have the timezone information consistent in
both joda and java.time joda dependnecy has to be updated

closes #72028
2021-04-29 09:59:28 +02:00
Nhat Nguyen
a461597c75
Upgrade to Lucene 8.8.2 on 8.0 (#71587) 2021-04-14 08:52:23 -04:00
Jason Tedor
74e8750712
Upgrade to JNA 5.7.0-1 (#69653)
This commit upgrades our JNA dependency to 5.7.0-1. The highlight of
this upgrade is that the Darwin native libraries are now universal
including support for both Intel-based and Apple Silicon-based Mac
hardware.
2021-03-01 13:11:21 -05:00
Ignacio Vera
747773d5af
Upgrade to Lucene 8.8.0 (#68272) 2021-02-01 13:36:03 +01:00
Jim Ferenczi
e77c523bd9
Upgrade to a new lucene 8.8.0 snapshot (#67691)
This change upgrades to the latest Lucene 8.8.0 snapshot.
It also restores the compression on binary doc values that was lost in the last snapshot upgrade.
The compression is now configurable on binary doc values but we don't expose this functionality yet so this commit ensures that we pick the same compression mode as previous releases (BEST_COMPRESSION).
2021-01-19 13:33:19 +01:00
Ignacio Vera
604ee06a3b
Upgrade to lucene-8.8-snapshot-f73f6b1 (#67228) 2021-01-12 08:03:00 +01:00
Ignacio Vera
4add5cb65d
Upgrade to Lucene-8.7.0 (#64532) 2020-11-03 16:04:26 +01:00