From d4aca44a80700b5c0162ab9ef9afd3ae89afbc94 Mon Sep 17 00:00:00 2001 From: Tatsuya Kawano Date: Sun, 5 Sep 2021 07:09:35 +0800 Subject: [PATCH 1/6] Fix a typo in the readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a0b29233..0e646fd7 100644 --- a/README.md +++ b/README.md @@ -342,7 +342,7 @@ To run all tests including `future` feature and doc tests on the README, use the following command: ```console -$ RUSTFLAGS='--cfg skeptic -cfg trybuild' cargo test --all-features +$ RUSTFLAGS='--cfg skeptic --cfg trybuild' cargo test --all-features ``` From c8b9794f0b5a096dc5b58e1e1e1bcd06984ddc04 Mon Sep 17 00:00:00 2001 From: Tatsuya Kawano Date: Sun, 5 Sep 2021 07:12:27 +0800 Subject: [PATCH 2/6] Downgrade crossbeam-epoch from v0.9.x to v0.8.x Downgrade crossbeam-epoch by downgrading moka-cht from v0.5.0 to v0.4.2. --- Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 29111035..02091fbb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,8 @@ future = ["async-io", "async-lock"] [dependencies] crossbeam-channel = "0.5" -moka-cht = "0.5" +# moka-cht = "0.5" +moka-cht = { git = "https://github.com/moka-rs/moka-cht", branch = "maint-0.4" } num_cpus = "1.13" once_cell = "1.7" parking_lot = "0.11" From 99d1a51fbc80fb92b28768dc370775249056a6ca Mon Sep 17 00:00:00 2001 From: Tatsuya Kawano Date: Mon, 6 Sep 2021 00:02:37 +0800 Subject: [PATCH 3/6] Downgrade crossbeam-epoch from v0.9.x to v0.8.x moka-cht v0.4.2 has been published to crates.io. --- Cargo.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 02091fbb..3c8d9d2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,8 +25,7 @@ future = ["async-io", "async-lock"] [dependencies] crossbeam-channel = "0.5" -# moka-cht = "0.5" -moka-cht = { git = "https://github.com/moka-rs/moka-cht", branch = "maint-0.4" } +moka-cht = "0.4.2" num_cpus = "1.13" once_cell = "1.7" parking_lot = "0.11" From 2680faab59d5bd380111e41b68c88d5b3101cfa9 Mon Sep 17 00:00:00 2001 From: Tatsuya Kawano Date: Mon, 6 Sep 2021 06:50:55 +0800 Subject: [PATCH 4/6] Update the change log --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa77d7e8..6a97777a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,12 @@ - Add examples for `get_or_insert_with` and `get_or_try_insert_with` methods to the docs. ([#30][gh-pull-0030]) +### Changed + +- Downgrade crossbeam-epoch used in moka-cht from v0.9.x to v0.8.x as a + possible workaround for segmentation faults on many-core CPU machines. + ([#33](gh-pull-0033)) + ## Version 0.5.1 @@ -96,7 +102,8 @@ [caffeine-git]: https://github.com/ben-manes/caffeine -[gh-issue-0030]: https://github.com/moka-rs/moka/issues/30/ +[gh-pull-0033]: https://github.com/moka-rs/moka/pull/33/ +[gh-issue-0031]: https://github.com/moka-rs/moka/issues/31/ [gh-pull-0030]: https://github.com/moka-rs/moka/pull/30/ [gh-pull-0028]: https://github.com/moka-rs/moka/pull/28/ [gh-pull-0022]: https://github.com/moka-rs/moka/pull/22/ From 1b0d4a58740fa685e63672a6f33ac6ab093c1e57 Mon Sep 17 00:00:00 2001 From: Tatsuya Kawano Date: Mon, 6 Sep 2021 07:38:39 +0800 Subject: [PATCH 5/6] Fix a broken link in the change log --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a97777a..2086bc9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ - Downgrade crossbeam-epoch used in moka-cht from v0.9.x to v0.8.x as a possible workaround for segmentation faults on many-core CPU machines. - ([#33](gh-pull-0033)) + ([#33][gh-pull-0033]) ## Version 0.5.1 From 7e9485f17d1f86a405f340ba10b5786eeb6ef692 Mon Sep 17 00:00:00 2001 From: Tatsuya Kawano Date: Mon, 6 Sep 2021 07:51:18 +0800 Subject: [PATCH 6/6] Rewrite a change log entry for clarity --- CHANGELOG.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2086bc9f..a8d9cf54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,11 @@ ### Fixed -- Fix `get_or_insert_with` and `get_or_try_insert_with` methods in `future::Cache` - can lead undefined behavior as accepting `init` future that is not `Send` or - `'static`. ([#31][gh-issue-0031]) +- Fix a bug in `get_or_insert_with` and `get_or_try_insert_with` methods of + `future::Cache` by adding missing bounds `Send` and `'static` to the `init` + future. Without this fix, these methods will accept non-`Send` or + non-`'static` future and may cause undefined behavior. + ([#31][gh-issue-0031]) - Fix `usize` overflow on big cache capacity. ([#28][gh-pull-0028]) ### Added @@ -16,8 +18,8 @@ ### Changed -- Downgrade crossbeam-epoch used in moka-cht from v0.9.x to v0.8.x as a - possible workaround for segmentation faults on many-core CPU machines. +- Downgrade crossbeam-epoch used in moka-cht from v0.9.x to v0.8.x as a possible + workaround for segmentation faults on many-core CPU machines. ([#33][gh-pull-0033])