Skip to content
Closed
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8d9e5e2
add notify min broker id change
Sep 8, 2025
f2f5836
add notify min broker id change
Sep 8, 2025
293924f
Merge remote-tracking branch 'upstream/main' into broker_id_change
Sep 8, 2025
5305d54
Merge remote-tracking branch 'upstream/main' into broker_id_change
Sep 8, 2025
daad8ef
Broker id Change function external logic implementation
Sep 9, 2025
2547c9b
Broker id Change function external logic implementation
Sep 9, 2025
79344ea
Broker id Change function external logic implementation
Sep 10, 2025
1471dd5
Implementation Notification Broker Id Change Logic
Sep 10, 2025
c15c6f3
Implementation Notification Broker Id Change Logic
Sep 10, 2025
b0f772a
Implementation Notification Broker Id Change Logic
Sep 10, 2025
7851482
Broker id Change function external logic implementation
Sep 10, 2025
afdaf8d
Broker id Change function external logic implementation
Sep 10, 2025
8a8fce3
Broker id Change function external logic implementation
Sep 10, 2025
883d018
Broker id Change function external logic implementation
Sep 10, 2025
ae12384
update broker ha info
Sep 12, 2025
aef0e5c
Broker id Change function external logic implementation
Sep 12, 2025
ec9ab12
fetch code
Sep 12, 2025
4f6b8a4
update broker ha info
Sep 12, 2025
a9853b6
update logic
Sep 12, 2025
ff7327f
update logic
Sep 12, 2025
8a10f21
merge
watchgou Sep 14, 2025
2086221
Merge remote-tracking branch 'upstream/main'
watchgou Sep 15, 2025
a53fca7
reset master flush offset
watchgou Sep 15, 2025
736c7cd
reset master flush offset
watchgou Sep 15, 2025
bb9525e
Merge remote-tracking branch 'upstream/main'
watchgou Sep 16, 2025
974c45e
Merge remote-tracking branch 'upstream/main'
watchgou Sep 16, 2025
1662aa0
Merge remote-tracking branch 'upstream/main'
watchgou Sep 16, 2025
eff1404
ffi::c uchar, which does not adapt to macos system, it is recommended to
watchgou Sep 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rocketmq-store/src/utils/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ pub fn mincore(addr: *const u8, len: usize, vec: *const u8) -> i32 {
{
use std::ffi::c_void;

use libc::c_uchar;
use libc::c_char;

unsafe { libc::mincore(addr as *mut c_void, len, vec as *mut c_uchar) }
unsafe { libc::mincore(addr as *mut c_void, len, vec as *mut c_char) }
}
Comment on lines +96 to 99
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix FFI type for mincore vec: use c_uchar, not c_char (compile error E0308).

libc::mincore expects vec: *mut c_uchar (aka *mut u8). Passing *mut c_char (*mut i8) causes the current CI failure.

Apply this diff:

-        use libc::c_char;
+        use libc::c_uchar;

-        unsafe { libc::mincore(addr as *mut c_void, len, vec as *mut c_char) }
+        unsafe { libc::mincore(addr as *mut c_void, len, vec as *mut c_uchar) }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
use libc::c_char;
unsafe { libc::mincore(addr as *mut c_void, len, vec as *mut c_uchar) }
unsafe { libc::mincore(addr as *mut c_void, len, vec as *mut c_char) }
}
use libc::c_uchar;
unsafe { libc::mincore(addr as *mut c_void, len, vec as *mut c_uchar) }
}
🧰 Tools
🪛 GitHub Actions: CI

[error] 98-98: Command cargo clippy -- -D warnings failed due to compile error: mismatched types in FFI call to libc::mincore. The function expects vec: *mut c_uchar, but vec is passed as *mut c_char in rocketmq-store/src/utils/ffi.rs:98 (E0308).

🪛 GitHub Actions: Codecov

[error] 98-98: Rust compile error: mismatched types in mincore call. expected *mut u8, found *mut i8 for vec parameter in unsafe { libc::mincore(addr as *mut c_void, len, vec as *mut c_char) } at rocketmq-store/src/utils/ffi.rs:98.

🤖 Prompt for AI Agents
In rocketmq-store/src/utils/ffi.rs around lines 96 to 99, the FFI call to
libc::mincore uses a pointer typed as *mut c_char which is incorrect and causes
E0308; change the type to *mut c_uchar (and import/use libc::c_uchar if not
already) and cast vec to that pointer when calling mincore so the third
parameter matches libc::mincore's expected *mut c_uchar.

#[cfg(windows)]
{
Expand Down
Loading