mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-28 02:20:42 +00:00
Ignore zero sized cluster size in pageserver feedback.
To take into account that non zero shards send 0 size. Generally we should make reporting sharding aware, but for now this will avoid breaking size limit after https://github.com/neondatabase/neon/pull/6567
This commit is contained in:
@@ -265,9 +265,9 @@ impl WalSendersShared {
|
||||
/// Update aggregated pageserver feedback. LSNs (last_received,
|
||||
/// disk_consistent, remote_consistent) and reply timestamp are just
|
||||
/// maximized; timeline_size if taken from feedback with highest
|
||||
/// last_received lsn. This is generally reasonable, but we might want to
|
||||
/// implement other policies once multiple pageservers start to be actively
|
||||
/// used.
|
||||
/// last_received lsn except when it is 0 (sent from non zero shards). This
|
||||
/// is generally reasonable, but we might want to implement other policies
|
||||
/// once multiple pageservers start to be actively used.
|
||||
fn update_ps_feedback(&mut self) {
|
||||
let init = PageserverFeedback::empty();
|
||||
let acc =
|
||||
@@ -276,7 +276,9 @@ impl WalSendersShared {
|
||||
.flatten()
|
||||
.fold(init, |mut acc, ws_state| match ws_state.feedback {
|
||||
ReplicationFeedback::Pageserver(feedback) => {
|
||||
if feedback.last_received_lsn > acc.last_received_lsn {
|
||||
if feedback.current_timeline_size != 0
|
||||
&& feedback.last_received_lsn > acc.last_received_lsn
|
||||
{
|
||||
acc.current_timeline_size = feedback.current_timeline_size;
|
||||
}
|
||||
acc.last_received_lsn =
|
||||
|
||||
Reference in New Issue
Block a user