Skip to content

Bump dalli from 3.2.8 to 5.0.6 - #6752

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/bundler/dalli-5.0.6
Open

Bump dalli from 3.2.8 to 5.0.6#6752
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/bundler/dalli-5.0.6

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 10, 2026

Copy link
Copy Markdown
Contributor

Bumps dalli from 3.2.8 to 5.0.6.

Release notes

Sourced from dalli's releases.

v5.0.6

Performance:

  • Skip the cas-return flag on quiet meta_set requests (#1131)

    • In quiet mode memcached suppresses the ms response entirely, so the CAS requested by the c flag can never be read; sending it only added two bytes to every request
    • Applies to the bulk-write paths, where quiet sets are emitted: Dalli::Client#multi blocks and the pipelined setter
    • Extracted from #1130; thanks to Jianbin Chen for this contribution
  • Reduce allocations in KeyRegularizer and multi-key request paths (#1120)

    • Decomposed KeyRegularizer#encode into separate needs_encoding? and encode calls so the common happy path avoids allocating an intermediate array for the two-element return value
    • Refactored multi_get/multi_set/multi_delete command generation into RequestFormatter to share its key-encoding helpers
    • Thanks to Jean Boussier for this contribution
  • Reduce allocations in ResponseBuffer pipelined getk parsing (#1117)

    • process_single_getk_response was building a fresh array to return results alongside the updated offset; refactored to store the offset as the last element of the existing tokens array and pop it, saving one allocation per response
    • Also skips trailing nils in the token array
    • Thanks to Jean Boussier for this contribution
  • Enable frozen string literals in RequestFormatter (#1118)

    • Frozen string literals had been inadvertently disabled; re-enabling reduces allocations by ~300,000 objects in a 10,000-iteration get_multi_cas benchmark (562 MB → 550 MB total allocated)
    • Thanks to Jean Boussier for this contribution
  • Reduce allocations in ResponseProcessor#value_from_tokens (#1113)

    • token[1..].to_i was allocating a new string for every token parsed; replaced with in-place slice! followed by a token reset to avoid poisoning subsequent token comparisons
    • Saves 4 allocations per entry in get_multi_cas workloads (a hotspot for IdentityCache)
    • Thanks to Jean Boussier for this contribution
  • Reduce allocations in common operation paths (#1111)

    • Use Symbol#name over Symbol#to_s to return a frozen string without allocation
    • Skip trace attribute hash construction when OpenTelemetry instrumentation is disabled
    • Use argument forwarding (...) in Client#perform and Threadsafe#request to avoid splat array allocation
    • Use match? in KeyRegularizer#encode to avoid MatchData object allocation
    • Reduces objects allocated by ~26% and memory by ~6% for a simple get workload
    • Thanks to Jean Boussier for this contribution
  • Fix pathological memory behavior in ResponseBuffer (#1114)

    • compact_if_needed was intended to reclaim memory by slicing off consumed bytes, but buffer.byteslice(@offset..) on an unfrozen string causes Ruby to allocate a hidden third string as the copy-on-write owner rather than freeing the original
    • Redesigns buffer management to pass reusable buffer objects directly to read/read_nonblock, avoiding reallocation on each response read
    • Reduces allocations from ~2.38 GB to ~649 MB in a get_multi_cas benchmark over 10,000 iterations
    • Accompanied by new unit tests for ResponseBuffer (#1115)
    • Thanks to Jean Boussier for this contribution

Features:

  • delete_multi now returns the number of keys found and deleted (#1126)
    • Previously the return value was unspecified; callers (e.g. Rails, see rails/rails#58071) had no way to tell how many keys were actually removed
    • The count is derived from the meta protocol's quiet-mode delete responses with no extra round-trips: successful deletes are suppressed while misses report NF, so any response received before the terminator is a key that was not deleted
    • The single-server fast path now shares the pipelined path's bounded retry on transient (RetryableNetworkError) network errors, so both paths behave consistently; the returned count is best-effort and may under-report if a network error triggers a retry, since keys deleted before the error are not recounted
    • Thanks to Iliana Hadzhiatanasova for this contribution

... (truncated)

Changelog

Sourced from dalli's changelog.

5.0.6

Performance:

  • Skip the cas-return flag on quiet meta_set requests (#1131)

    • In quiet mode memcached suppresses the ms response entirely, so the CAS requested by the c flag can never be read; sending it only added two bytes to every request
    • Applies to the bulk-write paths, where quiet sets are emitted: Dalli::Client#multi blocks and the pipelined setter
    • Extracted from #1130; thanks to Jianbin Chen for this contribution
  • Reduce allocations in KeyRegularizer and multi-key request paths (#1120)

    • Decomposed KeyRegularizer#encode into separate needs_encoding? and encode calls so the common happy path avoids allocating an intermediate array for the two-element return value
    • Refactored multi_get/multi_set/multi_delete command generation into RequestFormatter to share its key-encoding helpers
    • Thanks to Jean Boussier for this contribution
  • Reduce allocations in ResponseBuffer pipelined getk parsing (#1117)

    • process_single_getk_response was building a fresh array to return results alongside the updated offset; refactored to store the offset as the last element of the existing tokens array and pop it, saving one allocation per response
    • Also skips trailing nils in the token array
    • Thanks to Jean Boussier for this contribution
  • Enable frozen string literals in RequestFormatter (#1118)

    • Frozen string literals had been inadvertently disabled; re-enabling reduces allocations by ~300,000 objects in a 10,000-iteration get_multi_cas benchmark (562 MB → 550 MB total allocated)
    • Thanks to Jean Boussier for this contribution
  • Reduce allocations in ResponseProcessor#value_from_tokens (#1113)

    • token[1..].to_i was allocating a new string for every token parsed; replaced with in-place slice! followed by a token reset to avoid poisoning subsequent token comparisons
    • Saves 4 allocations per entry in get_multi_cas workloads (a hotspot for IdentityCache)
    • Thanks to Jean Boussier for this contribution
  • Reduce allocations in common operation paths (#1111)

    • Use Symbol#name over Symbol#to_s to return a frozen string without allocation
    • Skip trace attribute hash construction when OpenTelemetry instrumentation is disabled
    • Use argument forwarding (...) in Client#perform and Threadsafe#request to avoid splat array allocation
    • Use match? in KeyRegularizer#encode to avoid MatchData object allocation
    • Reduces objects allocated by ~26% and memory by ~6% for a simple get workload
    • Thanks to Jean Boussier for this contribution
  • Fix pathological memory behavior in ResponseBuffer (#1114)

    • compact_if_needed was intended to reclaim memory by slicing off consumed bytes, but buffer.byteslice(@offset..) on an unfrozen string causes Ruby to allocate a hidden third string as the copy-on-write owner rather than freeing the original
    • Redesigns buffer management to pass reusable buffer objects directly to read/read_nonblock, avoiding reallocation on each response read
    • Reduces allocations from ~2.38 GB to ~649 MB in a get_multi_cas benchmark over 10,000 iterations
    • Accompanied by new unit tests for ResponseBuffer (#1115)
    • Thanks to Jean Boussier for this contribution

Features:

  • delete_multi now returns the number of keys found and deleted (#1126)
    • Previously the return value was unspecified; callers (e.g. Rails, see rails/rails#58071) had no way to tell how many keys were actually removed
    • The count is derived from the meta protocol's quiet-mode delete responses with no extra round-trips: successful deletes are suppressed while misses report NF, so any response received before the terminator is a key that was not deleted
    • The single-server fast path now shares the pipelined path's bounded retry on transient (RetryableNetworkError) network errors, so both paths behave consistently; the returned count is best-effort and may under-report if a network error triggers a retry, since keys deleted before the error are not recounted

... (truncated)

Commits

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Aug 10, 2026
@dependabot
dependabot Bot force-pushed the dependabot/bundler/dalli-5.0.6 branch from 16020ba to 6818590 Compare August 11, 2026 16:49
Bumps [dalli](https://github.com/petergoldstein/dalli) from 3.2.8 to 5.0.6.
- [Release notes](https://github.com/petergoldstein/dalli/releases)
- [Changelog](https://github.com/petergoldstein/dalli/blob/main/CHANGELOG.md)
- [Commits](petergoldstein/dalli@v3.2.8...v5.0.6)

---
updated-dependencies:
- dependency-name: dalli
  dependency-version: 5.0.6
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/bundler/dalli-5.0.6 branch from 6818590 to b874ac6 Compare August 18, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants