mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-28 02:20:42 +00:00
report generation in PageserverFeedback (maybe we don't need this if we include in Offer RPC response?)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user