diff --git a/pageserver/src/tenant/timeline.rs b/pageserver/src/tenant/timeline.rs index 509dff4d41..4210abe962 100644 --- a/pageserver/src/tenant/timeline.rs +++ b/pageserver/src/tenant/timeline.rs @@ -862,7 +862,7 @@ impl Timeline { // S3 has a 5 GB limit on the size of one upload (without multi-part upload), and // we want to stay below that with a big margin. The LSN distance determines how // much WAL the safekeepers need to store. - if distance >= self.get_checkpoint_distance().into() + if distance >= i128::from(self.get_checkpoint_distance()) || open_layer_size > self.get_checkpoint_distance() || (distance > 0 && last_freeze_ts.elapsed() >= self.get_checkpoint_timeout()) { diff --git a/pageserver/src/walredo.rs b/pageserver/src/walredo.rs index 98730a7637..38cbfe678e 100644 --- a/pageserver/src/walredo.rs +++ b/pageserver/src/walredo.rs @@ -883,7 +883,7 @@ impl PostgresRedoManager { // into this buffer. let mut resultbuf = vec![0; BLCKSZ.into()]; let mut nresult: usize = 0; // # of bytes read into 'resultbuf' so far - while nresult < BLCKSZ.into() { + while nresult < usize::from(BLCKSZ) { // We do two things simultaneously: reading response from stdout // and forward any logging information that the child writes to its stderr to the page server's log. let n = loop {