This is an automated email from the ASF dual-hosted git repository. hgruszecki pushed a commit to branch macos-fs-fix in repository https://gitbox.apache.org/repos/asf/iggy.git
commit 66838cf87a733ddbcc31e1e64495802ce49563a3 Author: Hubert Gruszecki <h.grusze...@gmail.com> AuthorDate: Sat Jul 5 13:01:47 2025 +0200 fix(io_uring): fix hanging fs API by commenting out thread_pool_limit(0) for macOS --- core/server/src/bootstrap.rs | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/core/server/src/bootstrap.rs b/core/server/src/bootstrap.rs index 6a2eb8af..1d5b59a2 100644 --- a/core/server/src/bootstrap.rs +++ b/core/server/src/bootstrap.rs @@ -122,21 +122,27 @@ pub fn create_root_user() -> User { } pub fn create_shard_executor() -> Runtime { - //TODO: The event intererval tick, could be configureed based on the fact + // TODO: The event intererval tick, could be configured based on the fact // How many clients we expect to have connected. // This roughly estimates the number of tasks we will create. - let proactor = compio::driver::ProactorBuilder::new() + + let mut proactor = compio::driver::ProactorBuilder::new(); + + proactor .capacity(4096) .coop_taskrun(true) - .taskrun_flag(false) //TODO: Try enabling this. - .thread_pool_limit(0) - .to_owned(); - let rt = compio::runtime::RuntimeBuilder::new() - .with_proactor(proactor) + .taskrun_flag(false); // TODO: Try enabling this. + + // FIXME(hubcio): Only set thread_pool_limit(0) on non-macOS platforms + // This causes a freeze on macOS with compio fs operations + #[cfg(not(all(target_os = "macos", target_arch = "aarch64")))] + proactor.thread_pool_limit(0); + + compio::runtime::RuntimeBuilder::new() + .with_proactor(proactor.to_owned()) .event_interval(69) .build() - .unwrap(); - rt + .unwrap() } pub fn resolve_persister(enforce_fsync: bool) -> Arc<PersisterKind> {