Skip to content

Commit 084c5ca

Browse files
*: bump 0.4.2 (#357)
* *: bump 0.4.2 Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> * Bugfix. Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> * Update toolchain. Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> * Correct version Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> * Fix clippy errors. Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> * Fix test compilation errs. Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> * Polish changelog and upload codecov report with TOKEN. Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> * Fix MacOS compilation errs. Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> * Revert "Fix MacOS compilation errs." This reverts commit 5277389. Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> * Optimize the ci workflow. Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> * Downgrade the version to meet the space usage limit of CI. Signed-off-by: lucasliang <nkcs_lykx@hotmail.com> --------- Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
1 parent e505d63 commit 084c5ca

File tree

8 files changed

+26
-14
lines changed

8 files changed

+26
-14
lines changed

.github/workflows/rust.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions-rs/toolchain@v1
2020
with:
2121
profile: minimal
22-
toolchain: nightly-2023-07-01
22+
toolchain: nightly-2023-12-31
2323
override: true
2424
components: rustfmt, clippy, rust-src
2525
- uses: Swatinem/rust-cache@v1
@@ -34,6 +34,8 @@ jobs:
3434
git diff --exit-code
3535
- name: Clippy
3636
run: make clippy
37+
env:
38+
EXTRA_CARGO_ARGS: '--fix'
3739
- name: Run tests
3840
run: make test
3941
env:
@@ -60,7 +62,7 @@ jobs:
6062
uses: actions-rs/toolchain@v1
6163
with:
6264
profile: minimal
63-
toolchain: 1.67.1
65+
toolchain: 1.75.0
6466
override: true
6567
components: rustfmt, clippy, rust-src
6668
- uses: Swatinem/rust-cache@v1
@@ -87,7 +89,7 @@ jobs:
8789
uses: actions-rs/toolchain@v1
8890
with:
8991
profile: minimal
90-
toolchain: nightly-2023-07-01
92+
toolchain: nightly-2023-12-31
9193
override: true
9294
components: llvm-tools-preview
9395
- uses: Swatinem/rust-cache@v1
@@ -99,12 +101,14 @@ jobs:
99101
run: |
100102
make test_matrix
101103
env:
102-
RUSTFLAGS: '-Zinstrument-coverage'
104+
RUSTFLAGS: '-Cinstrument-coverage'
103105
LLVM_PROFILE_FILE: '%p-%m.profraw'
104106
EXTRA_CARGO_ARGS: '--verbose'
105107
- name: Run grcov
106108
run: grcov `find . \( -name "*.profraw" \) -print` --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov
107109
- name: Upload
108-
uses: codecov/codecov-action@v2
110+
uses: codecov/codecov-action@v3
111+
env:
112+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
109113
with:
110114
file: coverage.lcov

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## [Unreleased]
44

5+
## [0.4.2] - 2024-04-16
6+
7+
### Behavior Changes
8+
9+
* Periodically flush unsynced bytes when rewriting to avoid I/O jitters if flushing too many bytes impede the foreground writes. (#347)
10+
* Errors will be returned if rewriting fails, instread of `panic` directly. (#343)
11+
512
## [0.4.1] - 2023-09-14
613

714
### Behavior Changes

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
name = "raft-engine"
3-
version = "0.4.1"
3+
version = "0.4.2"
44
authors = ["The TiKV Project Developers"]
55
edition = "2018"
6-
rust-version = "1.66.0"
6+
rust-version = "1.75.0"
77
description = "A persistent storage engine for Multi-Raft logs"
88
readme = "README.md"
99
repository = "https://github.com/tikv/raft-engine"

ctl/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
22
name = "raft-engine-ctl"
3-
version = "0.4.1"
3+
version = "0.4.2"
44
authors = ["The TiKV Project Developers"]
55
edition = "2018"
6-
rust-version = "1.61.0"
6+
rust-version = "1.75.0"
77
description = "A control tool for Raft Engine"
88
repository = "https://github.com/tikv/raft-engine"
99
license = "Apache-2.0"
1010

1111
[dependencies]
1212
clap = { version = "3.1", features = ["derive", "cargo"] }
1313
env_logger = "0.10"
14-
raft-engine = { path = "..", version = "0.4.1", features = ["scripting", "internals"] }
14+
raft-engine = { path = "..", version = "0.4.2", features = ["scripting", "internals"] }

src/env/log_fd/unix.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl LogFd {
8383
while readed < buf.len() {
8484
let bytes = match pread(self.0, &mut buf[readed..], offset as i64) {
8585
Ok(bytes) => bytes,
86-
Err(e) if e == Errno::EINTR => continue,
86+
Err(Errno::EINTR) => continue,
8787
Err(e) => return Err(from_nix_error(e, "pread")),
8888
};
8989
// EOF
@@ -106,7 +106,7 @@ impl LogFd {
106106
while written < content.len() {
107107
let bytes = match pwrite(self.0, &content[written..], offset as i64) {
108108
Ok(bytes) => bytes,
109-
Err(e) if e == Errno::EINTR => continue,
109+
Err(Errno::EINTR) => continue,
110110
Err(e) if e == Errno::ENOSPC => return Err(from_nix_error(e, "nospace")),
111111
Err(e) => return Err(from_nix_error(e, "pwrite")),
112112
};

src/file_pipe_log/pipe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ mod tests {
713713
// Retire files.
714714
assert_eq!(pipe_log.purge_to(last).unwrap() as u64, last - first);
715715
// Try to read recycled file.
716-
for (_, handle) in handles.into_iter().enumerate() {
716+
for handle in handles.into_iter() {
717717
assert!(pipe_log.read_bytes(handle).is_err());
718718
}
719719
// Try to reuse.

src/swappy_allocator.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ impl Page {
288288
.read(true)
289289
.write(true)
290290
.create(true)
291+
.truncate(true)
291292
.open(path)
292293
.map_err(|e| error!("Failed to open swap file: {e}"))
293294
.ok()?;

stress/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "stress"
3-
version = "0.4.1"
3+
version = "0.4.2"
44
authors = ["The TiKV Authors"]
55
edition = "2018"
66

0 commit comments

Comments
 (0)