mirror of
https://github.com/neondatabase/neon.git
synced 2026-07-05 13:10:37 +00:00
WIP: page_cache_priming_writer: bugfixes
This commit is contained in:
@@ -1100,7 +1100,11 @@ impl OwnedAsyncWriter for VirtualFile {
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
async fn write_all_borrowed(&mut self, _buf: &[u8], _ctx: &RequestContext) -> std::io::Result<usize> {
|
||||
async fn write_all_borrowed(
|
||||
&mut self,
|
||||
_buf: &[u8],
|
||||
_ctx: &RequestContext,
|
||||
) -> std::io::Result<usize> {
|
||||
// TODO: ensure this through the type system
|
||||
panic!("this should not happen");
|
||||
}
|
||||
|
||||
@@ -85,9 +85,13 @@ where
|
||||
.try_into()
|
||||
.unwrap();
|
||||
self.cache
|
||||
.fill_cache(&self.under, self.written / (N as u64), page, ctx)
|
||||
.fill_cache(
|
||||
&self.under,
|
||||
(self.written / (N as u64)) + (page_no_in_buf as u64),
|
||||
page,
|
||||
ctx,
|
||||
)
|
||||
.await;
|
||||
self.written += N as u64;
|
||||
}
|
||||
self.written += nwritten as u64;
|
||||
Ok((nwritten, tokio_epoll_uring::Slice::into_inner(buf)))
|
||||
|
||||
Reference in New Issue
Block a user