mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-19 22:20:37 +00:00
REVIEW more the shutdown API
This commit is contained in:
@@ -557,6 +557,9 @@ impl DeltaLayerWriterInner {
|
||||
let cap = buf.cap();
|
||||
|
||||
// pad zeros to the next io alignment requirement.
|
||||
// TODO: this is actually padding to next PAGE_SZ multiple, but only if the buffer capacity is larger than that.
|
||||
// We can't let the fact that we do direct IO, or the buffer capacity, dictate the on-disk format we write here.
|
||||
// Need to find a better API that allows writing the format we intend to.
|
||||
let count = len.next_multiple_of(PAGE_SZ).min(cap) - len;
|
||||
buf.extend_with(0, count);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user