Skip to content

Commit

Permalink
*: bump 0.4.2 (#357)
Browse files Browse the repository at this point in the history
* *: bump 0.4.2

Signed-off-by: lucasliang <[email protected]>

* Bugfix.

Signed-off-by: lucasliang <[email protected]>

* Update toolchain.

Signed-off-by: lucasliang <[email protected]>

* Correct version

Signed-off-by: lucasliang <[email protected]>

* Fix clippy errors.

Signed-off-by: lucasliang <[email protected]>

* Fix test compilation errs.

Signed-off-by: lucasliang <[email protected]>

* Polish changelog and upload codecov report with TOKEN.

Signed-off-by: lucasliang <[email protected]>

* Fix MacOS compilation errs.

Signed-off-by: lucasliang <[email protected]>

* Revert "Fix MacOS compilation errs."

This reverts commit 5277389.

Signed-off-by: lucasliang <[email protected]>

* Optimize the ci workflow.

Signed-off-by: lucasliang <[email protected]>

* Downgrade the version to meet the space usage limit of CI.

Signed-off-by: lucasliang <[email protected]>

---------

Signed-off-by: lucasliang <[email protected]>
  • Loading branch information
LykxSassinator authored Apr 23, 2024
1 parent e505d63 commit 084c5ca
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 14 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-07-01
toolchain: nightly-2023-12-31
override: true
components: rustfmt, clippy, rust-src
- uses: Swatinem/rust-cache@v1
Expand All @@ -34,6 +34,8 @@ jobs:
git diff --exit-code
- name: Clippy
run: make clippy
env:
EXTRA_CARGO_ARGS: '--fix'
- name: Run tests
run: make test
env:
Expand All @@ -60,7 +62,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.67.1
toolchain: 1.75.0
override: true
components: rustfmt, clippy, rust-src
- uses: Swatinem/rust-cache@v1
Expand All @@ -87,7 +89,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-07-01
toolchain: nightly-2023-12-31
override: true
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v1
Expand All @@ -99,12 +101,14 @@ jobs:
run: |
make test_matrix
env:
RUSTFLAGS: '-Zinstrument-coverage'
RUSTFLAGS: '-Cinstrument-coverage'
LLVM_PROFILE_FILE: '%p-%m.profraw'
EXTRA_CARGO_ARGS: '--verbose'
- name: Run grcov
run: grcov `find . \( -name "*.profraw" \) -print` --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov
- name: Upload
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: coverage.lcov
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## [Unreleased]

## [0.4.2] - 2024-04-16

### Behavior Changes

* Periodically flush unsynced bytes when rewriting to avoid I/O jitters if flushing too many bytes impede the foreground writes. (#347)
* Errors will be returned if rewriting fails, instread of `panic` directly. (#343)

## [0.4.1] - 2023-09-14

### Behavior Changes
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "raft-engine"
version = "0.4.1"
version = "0.4.2"
authors = ["The TiKV Project Developers"]
edition = "2018"
rust-version = "1.66.0"
rust-version = "1.75.0"
description = "A persistent storage engine for Multi-Raft logs"
readme = "README.md"
repository = "https://github.com/tikv/raft-engine"
Expand Down
6 changes: 3 additions & 3 deletions ctl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "raft-engine-ctl"
version = "0.4.1"
version = "0.4.2"
authors = ["The TiKV Project Developers"]
edition = "2018"
rust-version = "1.61.0"
rust-version = "1.75.0"
description = "A control tool for Raft Engine"
repository = "https://github.com/tikv/raft-engine"
license = "Apache-2.0"

[dependencies]
clap = { version = "3.1", features = ["derive", "cargo"] }
env_logger = "0.10"
raft-engine = { path = "..", version = "0.4.1", features = ["scripting", "internals"] }
raft-engine = { path = "..", version = "0.4.2", features = ["scripting", "internals"] }
4 changes: 2 additions & 2 deletions src/env/log_fd/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl LogFd {
while readed < buf.len() {
let bytes = match pread(self.0, &mut buf[readed..], offset as i64) {
Ok(bytes) => bytes,
Err(e) if e == Errno::EINTR => continue,
Err(Errno::EINTR) => continue,
Err(e) => return Err(from_nix_error(e, "pread")),
};
// EOF
Expand All @@ -106,7 +106,7 @@ impl LogFd {
while written < content.len() {
let bytes = match pwrite(self.0, &content[written..], offset as i64) {
Ok(bytes) => bytes,
Err(e) if e == Errno::EINTR => continue,
Err(Errno::EINTR) => continue,
Err(e) if e == Errno::ENOSPC => return Err(from_nix_error(e, "nospace")),
Err(e) => return Err(from_nix_error(e, "pwrite")),
};
Expand Down
2 changes: 1 addition & 1 deletion src/file_pipe_log/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ mod tests {
// Retire files.
assert_eq!(pipe_log.purge_to(last).unwrap() as u64, last - first);
// Try to read recycled file.
for (_, handle) in handles.into_iter().enumerate() {
for handle in handles.into_iter() {
assert!(pipe_log.read_bytes(handle).is_err());
}
// Try to reuse.
Expand Down
1 change: 1 addition & 0 deletions src/swappy_allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ impl Page {
.read(true)
.write(true)
.create(true)
.truncate(true)
.open(path)
.map_err(|e| error!("Failed to open swap file: {e}"))
.ok()?;
Expand Down
2 changes: 1 addition & 1 deletion stress/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stress"
version = "0.4.1"
version = "0.4.2"
authors = ["The TiKV Authors"]
edition = "2018"

Expand Down

0 comments on commit 084c5ca

Please sign in to comment.