• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ben-manes / caffeine / #5441
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: v3.dev
DEFAULT BRANCH: master
Ran 08 May 2026 05:22AM UTC
Jobs 1
Files 78
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 May 2026 04:33AM UTC coverage: 100.0%. Remained the same
#5441

push

github

ben-manes
Preserve refresh and timestamps on async retry-loop no-op returns

Async retry loops in LocalAsyncCache.AsMapView (putIfAbsent, remove(k,v),
replace(k,v), replace(k,oldV,newV), computeIfAbsent, computeIfPresent,
compute, merge) and BoundedVarExpiration (putIfAbsentAsync, computeAsync)
return the existing future from cache.compute's lambda to signal "no change"
or "in-flight, retry next iteration". remap's regular tail then ran
expireAfterUpdate, reset accessTime/writeTime/variableTime, and called
discardRefresh — silently overwriting the entry's metadata and cancelling
any in-flight refreshAfterWrite.

The worst case was BoundedVarExpiration.putIfAbsentAsync, which uses
FixedExpireAfterWrite as the inner Expiry and so overwrote the entry's
variableTime with the caller's putIfAbsent duration instead of preserving
the user's configured Expiry — directly violating the documented
"has no effect on the duration if the entry was present" contract.

Replace the boolean[] preserveTimestamps signaling parameter on
LocalCache.compute with a small RemapHints struct carrying two flags:
preserveTimestamps (existing semantic, skip metadata writes) and
preserveRefresh (new, additionally suppress discardRefresh). The existing
refreshIfNeeded callers keep preserveTimestamps only — the rejected
refresh still gets cleaned up. The async retry-loop callers set both
flags when returning the same-instance value.

Surfaced by the temporal-walk audit (iss_2a0b20db).

3983 of 3990 branches covered (99.82%)

95 of 95 new or added lines in 5 files covered. (100.0%)

8163 of 8163 relevant lines covered (100.0%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #5441.1 08 May 2026 05:22AM UTC 78
100.0
Source Files on build #5441
  • Tree
  • List 78
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 4863e9ad on github
  • Prev Build on v3.dev
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc