Fix ftruncate method implementation in Handle struct

Co-Authored-By: christian@neon.tech <christian@neon.tech>
This commit is contained in:
Devin AI
2025-05-08 12:28:47 +00:00
parent 5dfc535ed0
commit f9e6049445

View File

@@ -206,6 +206,14 @@ impl Handle {
file: F,
len: u64,
) -> (F, Result<(), tokio_epoll_uring::Error<std::io::Error>>) {
self.deref().ftruncate(file, len).await
let system_handle = self.deref();
let op = tokio_epoll_uring::FtruncateOp { file, len };
tokio_epoll_uring::system::submission::op_fut::execute_op(
op,
system_handle.submit_side_weak(),
None,
system_handle.metrics().clone(),
)
.await
}
}