Skip to content

Commit

Permalink
Update remote partial name
Browse files Browse the repository at this point in the history
  • Loading branch information
petuhovskiy committed Mar 18, 2024
1 parent 68281b3 commit d0e928e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions safekeeper/src/wal_backup_partial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ impl PartialBackup {
XLogFileName(PG_TLI, segno, self.wal_seg_size)
}

fn remote_segment_name(&self, segno: u64, flush_lsn: Lsn) -> String {
fn remote_segment_name(&self, segno: u64, term: u64, commit_lsn: Lsn, flush_lsn: Lsn) -> String {
format!(
"{}_{:016X}_sk{}.partial",
"{}_{}_{:016X}_{:016X}_sk{}.partial",
self.segment_name(segno),
term,
commit_lsn.0,
flush_lsn.0,
self.conf.my_id.0,
)
Expand All @@ -104,7 +106,7 @@ impl PartialBackup {
let term = sk_info.term;
let segno = self.segno(flush_lsn);

let name = self.remote_segment_name(segno, flush_lsn);
let name = self.remote_segment_name(segno, term, commit_lsn, flush_lsn);

PartialRemoteSegment {
status: UploadStatus::InProgress,
Expand Down

0 comments on commit d0e928e

Please sign in to comment.