review: rename to commit LSN to commit_lsn

This commit is contained in:
Vlad Lazar
2024-11-18 12:06:12 +01:00
parent dc220e3f18
commit 1c8f4938cb
4 changed files with 7 additions and 7 deletions

View File

@@ -49,7 +49,7 @@ impl<IO: AsyncRead + AsyncWrite + Unpin> InterpretedWalSender<'_, IO> {
tokio::select! {
// Get some WAL from the stream and then: decode, interpret and send it
wal = stream.next() => {
let WalBytes { wal, wal_start_lsn, wal_end_lsn, available_wal_end_lsn } = match wal {
let WalBytes { wal, wal_start_lsn, wal_end_lsn, commit_lsn } = match wal {
Some(some) => some?,
None => { break; }
};
@@ -92,7 +92,7 @@ impl<IO: AsyncRead + AsyncWrite + Unpin> InterpretedWalSender<'_, IO> {
self.pgb
.write_message(&BeMessage::InterpretedWalRecords(InterpretedWalRecordsBody {
streaming_lsn: wal_end_lsn.0,
safekeeper_wal_end_lsn: available_wal_end_lsn.0,
commit_lsn: commit_lsn.0,
next_record_lsn: max_next_record_lsn.unwrap_or(Lsn::INVALID).0,
data: buf.as_slice(),
})).await?;

View File

@@ -38,7 +38,7 @@ pub(crate) struct WalBytes {
/// End LSN of [`Self::wal`]
pub(crate) wal_end_lsn: Lsn,
/// End LSN of WAL available on the safekeeper
pub(crate) available_wal_end_lsn: Lsn,
pub(crate) commit_lsn: Lsn,
}
impl WalReaderStreamBuilder {
@@ -135,7 +135,7 @@ impl WalReaderStreamBuilder {
wal,
wal_start_lsn: start_pos,
wal_end_lsn: start_pos + send_size as u64,
available_wal_end_lsn: end_pos
commit_lsn: end_pos
};
start_pos += send_size as u64;