-
Notifications
You must be signed in to change notification settings - Fork 44
fix(deps): update rust crate moka to 0.12.0 #100
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
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/moka-0.x
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5ab81bd to
7078123
Compare
7078123 to
2928aa5
Compare
2928aa5 to
8ba171d
Compare
5f850d6 to
0623ce6
Compare
0623ce6 to
71e7b5e
Compare
71e7b5e to
3c14298
Compare
3c14298 to
f3932ff
Compare
f3932ff to
6272e8b
Compare
6272e8b to
29596b0
Compare
29596b0 to
85b8c30
Compare
85b8c30 to
6af94cd
Compare
6af94cd to
38c8370
Compare
38c8370 to
af6fb4f
Compare
af6fb4f to
07ce509
Compare
07ce509 to
efa17da
Compare
efa17da to
f079248
Compare
f079248 to
ac61a05
Compare
ac61a05 to
68c849d
Compare
68c849d to
eed5002
Compare
eed5002 to
4b68bbe
Compare
Contributor
Author
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.9.4->0.12.0Release Notes
moka-rs/moka (moka)
v0.12.11Compare Source
Added
Equivalenttrait for the key typeKof the caches.([#492][gh-pull-0492])
jittered_expiry_policyexample ([#489][gh-pull-0489]).Changed
[@musicinmybrain][gh-musicinmybrain]).
Cargo.tomlwas changed fromMIT OR Apache-2.0to(MIT OR Apache-2.0) AND Apache-2.0.crossbeam-channelcrate fromv0.5.5tov0.5.15to avoid the following issue ([#514][gh-pull-0514],by [karankurbur][gh-karankurbur]).
loomcrate to a dev-dependency([#509][gh-pull-0509], by [thomaseizinger][gh-thomaseizinger]).
reqwestcrate in the dev-dependencies fromv0.11tov0.12([#531][gh-pull-0531], by [musicinmybrain][gh-musicinmybrain]).
Removed
thiserrorcrate by manually implementingstd::error::Errorformoka::PredicateError([#512][gh-pull-0512], by [@brownjohnf][gh-brownjohnf]).pastecrate from the dev-dependencies ([#504][gh-pull-0504]).async-stdcrate from the dev-dependencies ([#534][gh-pull-0534]).non_send_fields_in_send_tythat no longer applies([#505][gh-pull-0505], by [@qti3e][gh-qti3e]).
Fixed
by [@quantpoet][gh-quantpoet]).
v0.12.10Compare Source
Changed
quantafeature by default. ([#482][gh-pull-0482])quanta::Instantwithstd::time::Instantto increase theaccuracy of time measurements ([#481][gh-pull-0481]):
quantafeature is enabled,quanta::Instantis used for someperformance critical parts in the cache, and
std::time::Instantis used forthe rest of the parts.
quantafeature will not make anynoticeable difference in the performance.
quantafeature is disabled (default),std::time::Instantis used forall time measurements.
AtomicU64of theportable-atomiccrate, which provides fallbackimplementations for platforms where
stdAtomicU64is not available([#480][gh-pull-0480]):
moka'satomic64feature no longer has any effect on the build asAtomicU64is now always available on all platforms. But we keep theatomic64feature inCargo.tomlfor backward compatibility.v0.12.9Compare Source
Bumped the minimum supported Rust version (MSRV) to 1.70 (June 1, 2023)
([#474][gh-pull-0474]).
Fixed
to_std_instantmethod when per-entryexpiration policy is used. ([#472][gh-issue-0472])
([#464][gh-issue-0464])
documentation to explain some internal behavior of the cache.
Added
and_try_compute_if_nobody_elsemethod tofuture::Cache'sentryAPI.([#460][gh-pull-0460], by [@xuehaonan27][gh-xuehaonan27])
Removed
triomphecrate from the dependency by adding our own internalArctype.([#456][gh-pull-0456])
Arcwill be more memory efficient thanstd::sync::Arcortriomphe::Arcon 64-bit platforms as it uses a singleAtomicU32counter.async-traitusage. ([#445][gh-pull-0445], by[@Swatinem][gh-Swatinem])
Changed
atomic64feature only when target supportsAtomicU64.([#466][gh-pull-0466], by [@zonyitoo][gh-zonyitoo])
once_celldependency optional ([#444][gh-pull-0444]).([#452][gh-pull-0452], by [@JoJoDeveloping][gh-JoJoDeveloping])
v0.12.8Compare Source
Fixed
v0.1.12or newer) oftriomphecrate to keep ourMSRV (Minimum Supported Rust Version) at Rust 1.65
([#426][gh-pull-0426], by [@eaufavor][gh-eaufavor]).
[email protected]requires Rust 1.76 or newer, so it will not compile with ourMSRV.
[@arcstur][gh-arcstur]).
v0.12.7Compare Source
Changed
run_pending_tasksto evict as many entries as possiblefrom the cache ([#417][gh-pull-0417]).
v0.12.6Compare Source
Fixed
future::Cachethat pendingrun_pending_taskscalls may causeinfinite busy loop in an internal
schedule_write_opmethod([#412][gh-issue-0412]):
v0.12.0when the background threads were removedfrom
future::Cache.run_pending_taskmethod is called by user code whilecache is receiving a very high number of concurrent cache write operations.
(e.g.
insert,get_with,invalidateetc.)schedule_write_opmethod will be spinning in a busy loopforever, causing high CPU usage and all other async tasks to be starved.
Changed
async-lockcrate used byfuture::Cachefromv2.4to the latestv3.3.v0.12.5Compare Source
Added
([#390][gh-pull-0390]):
eviction_policymethod of the cachebuilder with a policy obtained by
EvictionPolicy::lrufunction.as it maintains better hit rate than LRU for most use cases. TinyLFU combines
LRU eviction policy and popularity-based admission policy. A probabilistic data
structure is used to estimate historical popularity of both hit and missed
keys. (not only the keys currently in the cache.)
recency biased workload such as streaming data processing. LRU policy can be
used for them to achieve better hit rate.
Window-TinyLFU in the future. It will adjust the balance between recency and
frequency based on the current workload.
v0.12.4Compare Source
Fixed
crossbeam-epochto run GC when dropping a cache ([#384][gh-pull-0384]):crossbeam-epochcrate provides an epoch-based memory reclamation scheme forconcurrent data structures. It is used by Moka cache to safely drop cached
entries while they are still being accessed by other threads.
crossbeam-epochdoes its best to reclaim memory (drop the entries evictedfrom the cache) when the epoch is advanced. However, it does not guarantee that
memory will be reclaimed immediately after the epoch is advanced. This means
that entries can remain in the memory for a while after the cache is dropped.
crossbeam-epoch's thread local buffers are flushed, helping to reclaim memoryimmediately.
while after a cache is dropped. We are looking for alternatives to
crossbeam-epochto improve this situation (e.g. [#385][gh-issue-0385]).Added
([#382][gh-pull-0382])
v0.12.3Compare Source
Added
([#370][gh-pull-0370]):
entryandentry_by_refAPIs have the following methods:and_upsert_withmethod to insert or update the entry.and_compute_withmethod to insert, update, remove or do nothing on theentry.
and_try_compute_withmethod, which is similar to above but returnsResult.Fixed
quantafrom>=0.11.0, <0.12.0to>=0.12.2, <0.13.0to avoid under-measuring the elapsed time on Apple siliconMacs ([#376][gh-pull-0376]).
later than expected.
v0.12.2Compare Source
Fixed
internal data structures ([#348][gh-pull-0348]):
when the cache is full and a second time when there is a room in the cache.
call (which is wrong), and the
entry_countmethod will keep returning a nonzero value after calling the
invalidate_allmethod (which is also wrong).is read ([#363][gh-pull-0363]):
is used to determine if the entry has been expired.
when pending tasks were processed. This delay caused issue that some entries
become temporarily unavailable for reads even though they have been accessed
recently. And then they will become available again after the pending tasks are
processed.
entry will remain valid until the time-to-idle has elapsed.
Note that both of [#348][gh-pull-0348] and [#363][gh-pull-0363] were already present
in
v0.11.xand older versions. However they were less likely to occur because theyhad background threads to periodically process pending tasks. So there were much
shorter time windows for these issues to occur.
Changed
[@nyurik][gh-nyurik])
([#340][gh-pull-0340], by [@nyurik][gh-nyurik])
Added
[@peter-scholtens][gh-peter-scholtens])
v0.12.1Compare Source
Added
Equivalenttrait for the key typeKof the caches.([#492][gh-pull-0492])
jittered_expiry_policyexample ([#489][gh-pull-0489]).Changed
[@musicinmybrain][gh-musicinmybrain]).
Cargo.tomlwas changed fromMIT OR Apache-2.0to(MIT OR Apache-2.0) AND Apache-2.0.crossbeam-channelcrate fromv0.5.5tov0.5.15to avoid the following issue ([#514][gh-pull-0514],by [karankurbur][gh-karankurbur]).
loomcrate to a dev-dependency([#509][gh-pull-0509], by [thomaseizinger][gh-thomaseizinger]).
reqwestcrate in the dev-dependencies fromv0.11tov0.12([#531][gh-pull-0531], by [musicinmybrain][gh-musicinmybrain]).
Removed
thiserrorcrate by manually implementingstd::error::Errorformoka::PredicateError([#512][gh-pull-0512], by [@brownjohnf][gh-brownjohnf]).pastecrate from the dev-dependencies ([#504][gh-pull-0504]).async-stdcrate from the dev-dependencies ([#534][gh-pull-0534]).non_send_fields_in_send_tythat no longer applies([#505][gh-pull-0505], by [@qti3e][gh-qti3e]).
Fixed
by [@quantpoet][gh-quantpoet]).
v0.12.0Compare Source
synccaches are no longer enabled by default: Please use a crate featuresyncto enable it.No more background threads: All cache types
future::Cache,sync::Cache, andsync::SegmentedCacheno longer spawn background threads.scheduled-thread-poolcrate was removed from the dependency.futuremodule were converted toasyncmethods. You may need to add.awaitto your code for those methods.
Immediate notification delivery: The
notification::DeliveryModeenum for theeviction listener was removed. Now all cache types behave as if the
Immediatedelivery mode is specified.
Please read the MIGRATION-GUIDE.md for more details.
Changed
futurecache ([#294][gh-pull-0294]) andsynccaches ([#316][gh-pull-0316]).
future::Cache. ([#309][gh-pull-0309])Fixed
do_insert_with_hashmethod gets the currentInstanttoo early when eviction listener is enabled. ([#322][gh-issue-0322])v0.11.3Compare Source
Fixed
sync::Cacheandsync::SegmentedCachewhere memory usage keptincreasing when the eviction listener was set with the
Immediatedelivery mode.([#295][gh-pull-0295])
v0.11.2Compare Source
Bumped the minimum supported Rust version (MSRV) to 1.65 (Nov 3, 2022).
([#275][gh-pull-0275])
Removed
num_cpuscrate from the dependency. ([#277][gh-pull-0277])Changed
([#265][gh-pull-0265], by [@Swatinem][gh-Swatinem])
v0.11.1Compare Source
Fixed
FrequencySketchin debug build.([#272][gh-pull-0272])
Added
examplesdirectory. ([#268][gh-pull-0268], by[@peter-scholtens][gh-peter-scholtens])
v0.11.0Compare Source
Added
apply to all entries in the cache, the
syncandfuturecaches can now allowdifferent expiration times for individual entries.
removemethod to thesyncandfuturecaches(#255):
invalidatemethod, this method discards any cached value for thekey, but returns a clone of the value.
Fixed
NonNullpointer derived from ashared reference. ([#259][gh-pull-0259])
Removed
unsynccache that was marked as deprecated in v0.10.0.v0.10.4Compare Source
v0.10.3Compare Source
v0.10.2Compare Source
Bumped the minimum supported Rust version (MSRV) to 1.60 (Apr 7, 2022).
([#252][gh-issue-0252])
Changed
quantacrate to v0.11.0. ([#251][gh-pull-0251])machis unmaintained"([#243][gh-issue-0243]) by replacing
machwithmach2.quantav0.11.0's MSRV is 1.60, so we also bumped the MSRV of Moka to 1.60.v0.10.1Compare Source
Fixed
futurecache'sblocking().invalidate(key)method does nottrigger the eviction listener. ([#242][gh-issue-0242])
Changed
syncandfuturecaches will not cache anything when the max capacity is setto zero ([#230][gh-issue-0230]):
though the max capacity is zero.
v0.10.0Compare Source
Breaking Changes
[Mini-Moka][mini-moka-crate]:
moka::unsync::Cache→mini_moka::unsync::Cachemoka::dash::Cache→mini_moka::sync::Cachesyncandfuturecaches([#199][gh-pull-0199]). They were deprecated in v0.8.0:
get_or_insert_with(Useget_withinstead)get_or_try_insert_with(Usetry_get_withinstead)syncandfuturecaches have been marked as deprecated([#193][gh-pull-0193]):
get_with_if(UseentryAPI'sor_insert_with_ifinstead)Added
entryandentry_by_refAPIs tosyncandfuturecaches([#193][gh-pull-0193]):
point, the following operations (methods) are provided:
or_defaultor_insertor_insert_withor_insert_with_ifor_optionally_insert_withor_try_insert_withEntrytype, which providesis_freshmethod tocheck if the value was freshly computed or already existed in the cache.
v0.9.9Compare Source
v0.9.8Compare Source
v0.9.7Compare Source
Fixed
get_withmethod offuturecache inflates future size by ~7x,sometimes causing stack overflow ([#212][gh-issue-0212]):
rustcoptimization issue on async functions([rust-lang/rust#62958][gh-rust-issue-62958]).
synccache will disablenotifications. ([#207][gh-issue-0207])
Added
build_with_hashermethod of cache builders.([#216][gh-pull-0216])
v0.9.6Compare Source
Fixed
get_withfamily methods to avoid evaluatinginitclosure or future multiple times in concurrent calls. ([#195][gh-pull-0195])
v0.9.5Compare Source
Added
optionally_get_withmethod tosyncandfuturecaches([#187][gh-pull-0187], by [@LMJW][gh-LMJW]):
try_get_withbut takes an init closure/future returning anOption<V>instead ofResult<V, E>.by_refversion of API forget_with,optionally_get_with, andtry_get_withofsyncandfuturecaches ([#190][gh-pull-0190], by[@LMJW][gh-LMJW]):
by_refversions but take a reference of the keyinstead of an owned key. If the key does not exist in the cache, the key will
be cloned to create new entry in the cache.
Changed
([#180][gh-pull-0180], by [@ClSlaid][gh-ClSlaid])
Fixed
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), 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 these updates again.
This PR was generated by Mend Renovate. View the repository job log.