| crate | version |
|---|---|
| foyer | 0.21.0 |
| foyer-common | 0.21.0 |
| foyer-memory | 0.21.0 |
| foyer-storage | 0.21.0 |
| foyer-bench | 0.21.0 |
Changes
Important
Breaking Changes:
- Hybrid cache and memory cache
fetch()API is renamed toget_or_fetch(), and there are subtle changes in the arguments. - Hybrid cache
get()API functions the same as the previousobtain(), and theobtain()API is removed because the naming is obscure. - The Error type returned by all interfaces that return Result and Error has been refactored. When manually implementing Code for cache key or value, please pay attention to how errors are handled as described in the interface comments.
Features and Enhances:
- Refine hybrid cache read-related APIS.
- New
get()API: Replace the oldobtain()API, support memory and disk cache read, request deduplication, and other optimizations. (The oldget()API without disk cache request deduplication is deprecated.) - New
get_or_fetch()API: Replace the oldfetch()API, support memory and disk cache read, automatic cache refill on cache miss, request duduplication, and other optimizations. - Fix panics with race condition while using both
get()(previouslyobtain()) andget_or_fetch()(previouslyfetch()) on the same key. - Refine error and result type with
get_or_fetch()API.
- New
- Refine
SourceandAgepreprotities. Now,Sourcerefer to where the entry comes from, e.g. memory cache, disk cache, or outer;Agerefer to the generation the entry is in the disk cache. - Refine
Errortype. UseOpenDAL-like error definition. - Auto implement
Codeforbytes::Byteswithoutserdefeature. - Reduce task spawning on recovery.
Bug Fixes:
- Fix panics when cancelling spawned fetch requests.
- Fix string trimming when parsing io throttle.
- Fix build on
x86targets.
Testing:
- Support simulating io latency with psync io engine in
foyer-bench. - Refine hybrid cache fuzzy test.
What's Changed
- build: refine ci triggers by @MrCroxx in build: refine ci triggers #1151
- fix: fix enabling dev-dependencies features with the same crate by @MrCroxx in fix: fix enabling dev-dependencies features with the same crate #1154
- chore: bump main branch to v0.21.0-dev, fulfill changelogs by @MrCroxx in chore: bump main branch to v0.21.0-dev, fulfill changelogs #1156
- test: introduce simulated io latency for psync engine by @MrCroxx in test: introduce simulated io latency for psync engine #1159
- chore: bump deps by @MrCroxx in chore: bump deps #1160
- test: separate read and fetch in hybrid cache fuzzy test by @MrCroxx in test: separate read and fetch in hybrid cache fuzzy test #1161
- fix: removed unnecessary constraints to allow use of non-static keys by @rrauch in fix: removed unnecessary constraints to allow use of non-static keys #1163
- chore: fix typos by @MrCroxx in chore: fix typos #1165
- fix: fix issue with untrimmed string while parsing throttle by @vadim2404 in fix: fix issue with untrimmed string while parsing throttle #1164
- fix: preserve raw cache capacity across shards by @Xuanwo in fix: preserve raw cache capacity across shards #1167
- fix: fix disk op duration metrics by @MrCroxx in fix: fix disk op duration metrics #1169
- chore: bump changelog by @MrCroxx in chore: bump changelog #1172
- chore: reduce task spawning during recovery by @leiysky in chore: reduce task spawning during recovery #1174
- refactor: refine read-related APIs to fix panics and refine APIs by @MrCroxx in refactor: refine read-related APIs to fix panics and refine APIs #1177
- docs: update docs for foyer v0.20 by @MrCroxx in docs: update docs for foyer v0.20 #1179
- fix: fix foyer build with nightly toolchain by @MrCroxx in fix: fix foyer build with nightly toolchain #1180
- fix: restore default random state for hybrid get and fetch by @MrCroxx in fix: restore default random state for hybrid get and fetch #1181
- feat: expose fetch state and role by @MrCroxx in feat: expose fetch state and role #1182
- refactor: use foyer defined result for memory get_or_fetch by @MrCroxx in refactor: use foyer defined result for memory get_or_fetch #1184
- refactor: use foyer defined result type for memory get_or_fetch() by @MrCroxx in refactor: use foyer defined result type for memory get_or_fetch() #1185
- refactor: refine properties, remove source, refine age by @MrCroxx in refactor: refine properties, remove source, refine age #1186
- feat: support entry source (outer/memory/disk), refine test utils by @MrCroxx in feat: support entry source (outer/memory/disk), refine test utils #1187
- refactor: expose entry source by @MrCroxx in refactor: expose entry source #1188
- fix: spawn fetch task to prevent from leader cancel by @MrCroxx in fix: spawn fetch task to prevent from leader cancel #1189
- docs: refine foyer crate rustdoc, use filtered readme by @MrCroxx in docs: refine foyer crate rustdoc, use filtered readme #1191
- feat: impl Code for bytes::Bytes by @tisonkun in feat: impl Code for bytes::Bytes #1195
- perf: split encode/decode bench w/wo serde feature by @MrCroxx in perf: split encode/decode bench w/wo serde feature #1196
- fix: fastant cannot build on x86 by @tisonkun in fix: fastant cannot build on x86 #1197
- ci: run test with single worker and deadlock detection by @MrCroxx in ci: run test with single worker and deadlock detection #1199
- refactor: loose get_or_fetch() closure trait bounds by @MrCroxx in refactor: loose get_or_fetch() closure trait bounds #1203
- refactor: refine error design by @MrCroxx in refactor: refine error design #1205
- refactor: refine get_or_fetch closure args by @MrCroxx in refactor: refine get_or_fetch closure args #1206
- refactor: refine Error and doc for Code trait impl by @MrCroxx in refactor: refine Error and doc for Code trait impl #1208
- chore: release foyer v0.21.0 by @MrCroxx in chore: release foyer v0.21.0 #1207
New Contributors
- @rrauch made their first contribution in fix: removed unnecessary constraints to allow use of non-static keys #1163
- @vadim2404 made their first contribution in fix: fix issue with untrimmed string while parsing throttle #1164
- @leiysky made their first contribution in chore: reduce task spawning during recovery #1174
Full Changelog: v0.20.1...v0.21.0
This discussion was created from the release v0.21.0.