Skip to content
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

Please update the Cargo.lock for moka cache to v0.9.8 #117

Open
tatsuya6502 opened this issue Jul 6, 2023 · 2 comments
Open

Please update the Cargo.lock for moka cache to v0.9.8 #117

tatsuya6502 opened this issue Jul 6, 2023 · 2 comments

Comments

@tatsuya6502
Copy link

Hi. Currently, moka cache version is pinned to v0.9.4 by the Cargo.lock file:

mvsqlite/Cargo.lock

Lines 1178 to 1179 in f2117d3

name = "moka"
version = "0.9.4"

Please upgrade it to v0.9.8 or the latest v0.11.2.

We found a critical bug that will cause a segfault in a corner case: moka-rs/moka#281 (comment). It is fixed for v0.11.0 and then backported to v0.9.8 and v0.10.3.

@tatsuya6502
Copy link
Author

A pull request is already opened by Renovate: #100

@tatsuya6502
Copy link
Author

I checked the usage of moka in mvSQLite, and I think it is okay to continue using v0.9.4.

I believe the bug will be triggered only when weigher (doc) is set, and all other timings in different threads are met. I found mvSQLite does not set weigher to any Caches.

nskey_cache: Cache::builder()
.time_to_live(Duration::from_secs(120))
.time_to_idle(Duration::from_secs(5))
.max_capacity(10000)
.build(),
// FDB read versions are valid for 5 seconds.
// We conservatively cache them for only 2 seconds here. If for some reason
// these versions still lived too long, FDB will error and the client will retry.
read_version_cache: Cache::builder()
.time_to_live(Duration::from_secs(2))
.max_capacity(1000)
.build(),
read_version_and_nsid_to_lwv_cache: Cache::builder()
.time_to_idle(Duration::from_secs(2))
.build(),
replica_manager,
ns_metadata_cache: NamespaceMetadataCache::new(),
content_cache: if config.content_cache_size > 0 {
Some(
Cache::builder()
.max_capacity(config.content_cache_size as u64)
.build(),
)

cache: Cache::builder()
.time_to_idle(Duration::from_secs(30))
.max_capacity(1000)
.build(),

Anyway, I would still encourage to upgrade moka to v0.9.8 or the latest v0.11.2 just for sure.

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

No branches or pull requests

1 participant