report generation in PageserverFeedback (maybe we don't need this if we include in Offer RPC response?)

This commit is contained in:
Christian Schwarz
2025-02-20 00:41:52 +01:00
parent 84bbe87d60
commit 436178faee
3 changed files with 16 additions and 3 deletions

View File

@@ -1020,7 +1020,7 @@ impl<IO: AsyncRead + AsyncWrite + Unpin> ReplyReader<IO> {
.walsenders
.record_ps_feedback(self.ws_guard.id, &ps_feedback);
self.tli
.update_remote_consistent_lsn(ps_feedback.remote_consistent_lsn)
.update_remote_consistent_lsn(ps_feedback.remote_consistent_lsn, ps_feedback.generation)
.await;
// in principle new remote_consistent_lsn could allow to
// deactivate the timeline, but we check that regularly through

View File

@@ -11,6 +11,7 @@ use safekeeper_api::models::{
use safekeeper_api::Term;
use tokio::fs::{self};
use tokio_util::sync::CancellationToken;
use utils::generation::Generation;
use utils::id::TenantId;
use utils::sync::gate::Gate;
@@ -974,7 +975,7 @@ impl WalResidentTimeline {
}
/// Update in memory remote consistent lsn.
pub async fn update_remote_consistent_lsn(&self, candidate: Lsn) {
pub async fn update_remote_consistent_lsn(&self, candidate: Lsn, generation: Generation) {
let mut shared_state = self.write_shared_state().await;
shared_state.sk.state_mut().inmem.remote_consistent_lsn = max(
shared_state.sk.state().inmem.remote_consistent_lsn,