Skip to content

Update Rust crate moka to v0.12.16 - #139

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/moka-0.x-lockfile
Open

Update Rust crate moka to v0.12.16#139
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/moka-0.x-lockfile

Conversation

@renovate

@renovate renovate Bot commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
moka dependencies patch 0.12.140.12.16

Release Notes

moka-rs/moka (moka)

v0.12.16

Compare Source

Fixed
  • Fixed a bug where cache eviction could stall permanently when the cache was
    configured with the non-default LRU eviction policy (EvictionPolicy::lru())
    by a race between insert and remove operations on the same key
    ([#​592][gh-pull-0592] by [@​kim-jhyeon][gh-kim-jhyeon], reported in
    [#​590][gh-issue-0590]):
    • This bug was introduced in v0.12.0 and affected sync::Cache,
      sync::SegmentedCache and future::Cache.
    • A race between applying a write recording for an entry and concurrently
      removing that entry from the internal concurrent hash table could leave an
      orphaned node at the front of the LRU queue. Once present, no entry was ever
      evicted again and the cache grew unboundedly past max_capacity.
    • The same race also affected the default TinyLFU eviction policy, but with
      a milder symptom: each occurrence permanently leaked one phantom entry
      slot, causing entry_count and weighted_size to over-report and the
      usable capacity to shrink by one entry per occurrence. Fixed by the same
      change.
Changed
  • Worked around a ThreadSanitizer false positive ([#​602][gh-pull-0602]):
    • Replaced the standalone fence(Acquire) in the internal MiniArc's drop
      path with an Acquire load of the reference count, so that downstream
      projects can now run ThreadSanitizer on code using Moka without hitting
      this false positive.
    • std::sync::Arc has a similar workaround.
  • Raised the minimum version of the crossbeam-epoch crate from v0.9.18 to
    v0.9.20 to avoid the following advisory ([#​603][gh-pull-0603]):
    • [RUSTSEC-2026-0204] crossbeam-epoch: invalid pointer dereference in
      fmt::Pointer for Atomic and Shared
    • Moka is not affected by this advisory because it never formats these
      pointer types. However, raising the minimum version prevents downstream
      lockfiles from resolving to an affected crossbeam-epoch version via
      Moka.

v0.12.15

Compare Source

Fixed
  • Fixed a bug where re-inserting an expired entry could cause it to lose its
    expiration time and remain in the cache indefinitely when using a custom Expiry
    policy with per-entry expiration. ([#​582][gh-pull-0582] by [@​jiangzhe][gh-jiangzhe],
    [#​581][gh-pull-0581] by [@​atrocities][gh-atrocities], reported in
    [#​575][gh-issue-0575]):
    • This occurred when an entry that had expired but not yet been evicted was
      re-inserted, and expire_after_update returned None. This primarily
      affected users who only override expire_after_create, since the default
      expire_after_update returns duration_until_expiry, which is None for
      expired entries.
    • This bug was introduced by the changes in v0.12.13 ([#​549][gh-pull-0549] and
      [#​564][gh-pull-0564]).
    • Subtle behavior change:
      • Before this fix, re-inserting an expired entry was treated as an update,
        so Expiry::expire_after_update was called.
      • After this fix, re-inserting an expired entry is treated as a creation,
        so Expiry::expire_after_create is called instead.
      • This may change the expiration time of re-inserted entries, depending on
        your Expiry trait implementation.
  • Fixed flaky tests cht::segment::tests::drop_many_values and
    drop_many_values_concurrent that were failing on high-core-count machines
    ([#​586][gh-pull-0586]):
    • These tests were using a CPU-dependent segment count, causing inconsistent
      bucket array shrinking behavior of the internal segmented hash map across
      different machines.
    • Changed these tests to use a fixed segment count (4) for consistent results.
Changed
  • Disabled flaky GC-dependent tests by default using run_flaky_tests cfg
    ([#​584][gh-pull-0584]):
    • These tests rely on epoch-based garbage collection (crossbeam-epoch) timing
      that is not guaranteed, causing intermittent failures.
    • Fixed [#​539][gh-issue-0539] and [#​580][gh-issue-0580].
    • To run these tests, set RUSTFLAGS='--cfg run_flaky_tests'.

Configuration

📅 Schedule: (UTC)

  • 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 this update again.


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

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot changed the title chore(deps): update rust crate moka to v0.12.15 Update Rust crate moka to v0.12.15 Apr 8, 2026
@renovate
renovate Bot force-pushed the renovate/moka-0.x-lockfile branch from babc4ea to aba141d Compare May 18, 2026 11:01
@renovate renovate Bot changed the title Update Rust crate moka to v0.12.15 Update Rust crate moka to v0.12.16 Aug 10, 2026
@renovate
renovate Bot force-pushed the renovate/moka-0.x-lockfile branch from aba141d to 94f0049 Compare August 10, 2026 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants