Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency com.github.ben-manes.caffeine:caffeine to v3 #7908

Open
wants to merge 826 commits into
base: 3.6.x
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 20, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.github.ben-manes.caffeine:caffeine 2.9.3 -> 3.1.6 age adoption passing confidence

Release Notes

ben-manes/caffeine

v3.1.6: 3.1.6

  • Fixed the log message when a key's equality has changed and corrupted the underlying map (#​900, SLF4J-529)
  • Added Implementation-Version and other MANIFEST.MF attributes (#​889)

v3.1.5: 3.1.5

Compare Source

Cache

  • Fixed clear() removing a key more than once due to a write-back removal listener (#​872)

JCache

  • Added support for loading the configuration from the cache manager's uri (#​877)

v3.1.4: 3.1.4

Compare Source

Added @​CanIgnoreReturnValue annotations for static analysis (#​868)

v3.1.3: 3.1.3

Cache

  • Fixed the build time dependency constraints from being leaked into the external metadata (#​867)
  • Fixed the cause of a removal notification for a discarded refresh when the entry was removed
  • Fixed the behavior for null lookups into returned unmodifiable maps to be consistent (#​864)
  • Fixed an unexpected delay of removal notifications when using a scheduler (#​859)
  • Fixed explicit refreshes from being deduped if the entry is pending eviction
  • Defaulted methods to @​CheckReturnValue for static analysis (#​863)
  • Reduced the lock hold time during Map.clear (#​835)

JCache

  • Fixed putAll with an immutable map that causes an exception when using a cache writer (#​841)

v3.1.2: 3.1.2

Cache

  • Added detection for when a key's equality has changed and corrupted the underlying map (SOLR-16489)
  • Improved the frequency sketch by better utilizing the cpu cache line to reduce memory accesses
  • Fixed computeIfAbsent when replacing a collected weak/soft value and the custom expiry fails
  • Improved refresh conflict detection to avoid unnecessarily discarding after a reload
  • Improved eviction when the weight is oversized (#​745)

Guava

  • Added an adapter from Guava's CacheLoader to Caffeine's (#​766)

JCache

  • Fixed Cache.getConfiguration() to return an immutable instance

v3.1.1: 3.1.1

  • Fixed refreshAfterWrite when racing with a removed entry (#​715)
  • Fixed gradle module metadata variant selection (#​716)

v3.1.0: 3.1.0

  • Fixed the publication of a removal notification when computing a null value on top of an expired entry
  • Fixed the publication of a removal notification for a conditional replacement on an unbounded cache
  • Fixed Map.equals when the traversal triggers an eviction and the subset of live entries matches
  • Improved refreshAfterWrite to return the new value if computed by the caller (#​688, #​699)
  • Added Interner for weak keyed equality caching (#​344)

v3.0.6: 3.0.6

  • Fixed AsyncCache.getAll when storing additional mappings (#​655)
  • Added the ability to specify the expiration time with the computation
  • Added a warning if writes stall due to blocked eviction (#​672)
  • Added advanced query support for obtaining entry metadata

v3.0.5: 3.0.5

Cache

  • Fixed reference eviction when used with a broken executor (JDK-8274349)
  • Suppressed log warnings if a future is cancelled or times out (#​597)
  • Removed @Nullable from LoadingCache.get(key) (#​594)
  • Fixed early expiration of in-flight async loads (#​625)

JCache

  • close() will now shutdown the executor and wait for in-flight loads to finish

v3.0.4: 3.0.4

Cache

  • Fixed cases that incorrectly notified the removal listener for no-op replacements (#​593)
  • Improved how refreshAfterWrite is triggered on a read to avoid hotspots
  • Added the ability to capture coldest & hottest weighted snapshots
  • Reduced the per-entry overhead when using weak/soft values
  • Fixed Map.entrySet.contains(o) to use reference equality

v3.0.3: 3.0.3

Cache

  • Fixed reading an intermittent null weak/soft value during a concurrent write (#​568)
  • Fixed extraneous eviction when concurrently removing a collected entry after a writer resurrects it with a new mapping (#​568)
  • Fixed excessive retries of discarding an expired entry when the fixed duration period is extended, thereby resurrecting it (#​568)

v3.0.2: 3.0.2

Cache

  • Added cancellation of the next scheduled expiration cleanup when the cache becomes empty (#​542)
  • Improved how variable expiration reorganizes the timer events (#​541)
  • Improved usage of nullness annotations (#​530)
  • Removed sun.misc.Unsafe and fallbacks
  • Added module descriptors (#​535)

v3.0.1: 3.0.1

  • Fixed thread local fallback initialization for striped buffer (#​515)
  • Improved eviction reordering for weighted caches (#​513)
  • Added putIfAbsent optimistic fastpath (#​506)

v3.0.0: 3.0.0

This release includes API incompatible changes.

Highlights
  • Java 11 or above is required
  • Java 8 users can continue to use version 2.x, which will be supported
API improvements
  • Added Policy.refreshes() for a snapshot of the in-flight refresh operations
  • CacheLoader and AsyncCacheLoader offer bulk factory methods
  • AsyncCacheLoader methods may now throw checked exceptions
  • Better usage of Checker Framework nullness annotations (#​337)
  • LoadingCache.refresh now returns the in-flight future (#​143)
  • Various unimplemented default methods are now abstract
  • Added LoadingCache.refreshAll convenience method
  • Bulk loads now receive a Set of keys (was Iterable)
  • More flexible generic bounds and type parameters
Implementation improvements
Incompatible changes
  • VarExpiration time-based puts now return the old value instead of a boolean result
  • Removed jandex resource as no longer utilized by Quarkus
  • Split Policy.Expiration into fixed and refresh interfaces
Deprecation removals
  • CacheWriter, SingleConsumerQueue, and UnsafeAccess
  • StatsCounter.recordEviction variations
  • CacheStats constructors
Notes
  • CacheWriter usages can be replaced by Map computations and Caffeine.evictionListener
  • For best performance Unsafe may be used if available, otherwise falls back to VarHandles
  • We will continue to support and maintain version 2.x for Java 8 users

Configuration

📅 Schedule: Branch creation - "every weekend" in timezone Europe/Prague, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/major-caffeine branch from 8f5d503 to 2b1b1ef Compare November 24, 2022 00:13
@renovate renovate bot changed the title fix(deps): update dependency com.github.ben-manes.caffeine:caffeine to v3 Update dependency com.github.ben-manes.caffeine:caffeine to v3 Dec 17, 2022
@renovate renovate bot changed the title Update dependency com.github.ben-manes.caffeine:caffeine to v3 fix(deps): update dependency com.github.ben-manes.caffeine:caffeine to v3 Dec 17, 2022
@renovate renovate bot force-pushed the renovate/major-caffeine branch from 2b1b1ef to 96a99e2 Compare December 22, 2022 06:01
@sonarqubecloud
Copy link

@renovate renovate bot changed the title fix(deps): update dependency com.github.ben-manes.caffeine:caffeine to v3 Update dependency com.github.ben-manes.caffeine:caffeine to v3 Jan 25, 2023
@renovate renovate bot changed the title Update dependency com.github.ben-manes.caffeine:caffeine to v3 fix(deps): update dependency com.github.ben-manes.caffeine:caffeine to v3 Jan 27, 2023
@renovate renovate bot force-pushed the renovate/major-caffeine branch from 96a99e2 to 4891532 Compare February 10, 2023 09:19
@renovate renovate bot force-pushed the renovate/major-caffeine branch from 4891532 to c7b5bcc Compare February 20, 2023 05:58
@sonarqubecloud
Copy link

micronaut-build and others added 19 commits February 26, 2023 22:46
This PR replaces the filter processing logic with a central `FilterRunner` class, and adds support for annotation-based filter methods (similar to controllers).

Changes:

- Replace most uses of `HttpFilter` with a new sealed `GenericHttpFilter` interface. `GenericHttpFilter`s are opaque, they are only processed by the `FilterRunner`. A `GenericHttpFilter` can be a legacy filter, a new annotation-based filter method, or one of a few special internal types.
- Implement new annotation-based filter parsing in static methods in `FilterRunner`. It scans & validates filter arguments, assigns binders, validates the return value, etc, and finally stuffs the filter metadata into a record that extends `GenericHttpFilter`. This code is also used by a processor that validates filter methods at compile time.
- Implement new filter logic in `FilterRunner`. The filter runner has a coroutine-inspired approach and tries to process filters sequentially, avoiding deep reactive call stacks. Reactive code is avoided altogether where possible.
Logback 1.3.x breaks binary compatability, and cannot be used in some cases with Micronaut 3.8.x

This commit adds this fact to the documentation
…#8850)

If the retry delay always increases by 1s then that's not an exponential progression, it's a linear progression where the delay time is calculated as 1s x n, and n is the number of retries.
- Refactor beans endpoint removing unnecessary reactive APIs
- Include disabled bean info in beans endpoint
graemerocher and others added 27 commits April 20, 2023 06:43
)

* tck: Write length and first 10 bytes if bytearray assertion fails

* Ignore flaky test

* Ignore flaky test

* Kick the CLA check which was asleep
#9128)

This PR replaces the HttpStreamsServerHandler, HandlerPublisher, HttpRequestDecoder and HttpResponseDecoder by a new PipeliningServerHandler. PipeliningServerHandler directly receives netty HttpMessages, combines them into a FullHttpRequest or StreamedHttpRequest, and passes them on to a handler. It also takes care of pipelining, so that the responses for different requests are sent in the same order those requests came in, which fixes some old bugs in RoutingInboundHandler.

PipeliningServerHandler optimizes the read and write operations. Concurrent reads are handled safely, removing the need for the FlowControlHandler even in the streaming case. Flushes are delayed until readComplete, so that multiple requests in the same TCP packet can be responded to in a single TCP packet as well.

The biggest performance win comes from message aggregation, however. While PipeliningServerHandler can handle a FullHttpRequest from FULL_CONTENT, it can also do some basic aggregation on its own. Small requests commonly have the HttpRequest and HttpContent come in in the same read call. PipeliningServerHandler will "hold back" the HttpRequest until readComplete to merge it with the HttpContent if available, into a FullHttpRequest. This gives a performance benefit downstream, it's actually ~600ns faster in FullHttpStackBenchmark by default than 4.0.x with FULL_CONTENT.

The big advantage over FULL_CONTENT is that this aggregation is always enabled and is not a compatibility issue. Large requests will still safely fall back to StreamedHttpRequest. FULL_CONTENT is still useful for customizers that want to observe the full HTTP message, however, and may give some perf benefit for medium-sized request bodies.

The reason this PR is so big is that now, many small requests are processed using the FullHttpRequest APIs. There are many subtle differences in this code path. For example, form items are parsed immediately and then passed to FormRouteCompleter, where previously parsing and processing would be interleaved (the reactive code path). This exposed some bugs because it moves some `if (refCnt > 0) release` calls to before the processing.
This fails in 4.0.0 as the response is OK
This got dropped in the merge by mistake...
Merge 3.9.x, fix TCK test and document breakage
* Use StringIntMap for propertyIndexOf
This patch replaces the propertyIndexOf method generated for each introspection with an optimized String->int map. For cases where propertyIndexOf may be called for many different types, this avoids a megamorphic call site (benchmark about 5x as fast). On the other hand, for cases where propertyIndexOf is only called with one or two different introspections at the same call site, this is slightly slower (benchmark about 0.65x as fast).

imo this tradeoff is acceptable, because the speedup for megamorphic case far exceeds the slowdown for the monomorphic case. Monomorphic call sites should also be less "hot" in practical code, so performance of propertyIndexOf matters less. Finally, the absolute performance difference is quite small for the monomorphic case, in the benchmark it's 70ns so roughly 1.5ns per item, while for the megamorphic case it's roughly 30ns per item.

Benchmark results, before this change:
Benchmark                    (itemCount)  (typeCount)  Mode  Cnt    Score   Error  Units
PropertyIndexBenchmark.test           50            1  avgt    5  115.205 ± 1.016  ns/op
PropertyIndexBenchmark.test           50            2  avgt    5  118.745 ± 0.106  ns/op
PropertyIndexBenchmark.test           50            3  avgt    5  832.091 ± 8.271  ns/op

After this change:
Benchmark                    (itemCount)  (typeCount)  Mode  Cnt    Score   Error  Units
PropertyIndexBenchmark.test           50            1  avgt    5  183.315 ± 0.435  ns/op
PropertyIndexBenchmark.test           50            2  avgt    5  162.453 ± 0.881  ns/op
PropertyIndexBenchmark.test           50            3  avgt    5  162.690 ± 1.004  ns/op

* Use array instead of list

---------

Co-authored-by: Denis Stepanov <[email protected]>
We had to disable Predictive Test Selection and Test Distribution for Kotest tests as Kotest was unsupported.

As of micronaut-test-4.0.0-M2, we use a supported version of Kotest 5, so this pr reverses

#8612

To re-enable these Gradle features
Apparently this causes some issues in some environements, probably
an ordering problem, but they should always be aligned in any case.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot changed the title fix(deps): update dependency com.github.ben-manes.caffeine:caffeine to v3 Update dependency com.github.ben-manes.caffeine:caffeine to v3 Apr 30, 2023
@renovate renovate bot force-pushed the renovate/major-caffeine branch from 0d301c9 to 4705566 Compare April 30, 2023 08:04
@CLAassistant
Copy link

CLAassistant commented Feb 7, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
7 out of 8 committers have signed the CLA.

✅ graemerocher
✅ timyates
✅ andriy-dmytruk
✅ sdelamo
✅ yawkat
✅ melix
✅ dstepanov
❌ GavrilovSV
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.