mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-09 06:22:57 +00:00
Look up wal directory properly in all find_end_of_wal callers.
ref #388
This commit is contained in:
@@ -242,13 +242,7 @@ impl ReceiveWalConn {
|
||||
my_info.server.node_id = node_id;
|
||||
|
||||
/* Calculate WAL end based on local data */
|
||||
let (flush_lsn, timeline) = self.timeline.find_end_of_wal(
|
||||
&self
|
||||
.conf
|
||||
.data_dir
|
||||
.join(format!("{}", server_info.timeline_id)),
|
||||
true,
|
||||
);
|
||||
let (flush_lsn, timeline) = self.timeline.find_end_of_wal(&self.conf.data_dir, true);
|
||||
my_info.flush_lsn = flush_lsn;
|
||||
my_info.server.timeline = timeline;
|
||||
|
||||
|
||||
@@ -232,7 +232,8 @@ impl TimelineTools for Option<Arc<Timeline>> {
|
||||
/// Find last WAL record. If "precise" is false then just locate last partial segment
|
||||
fn find_end_of_wal(&self, data_dir: &Path, precise: bool) -> (Lsn, TimeLineID) {
|
||||
let seg_size = self.get().get_info().server.wal_seg_size as usize;
|
||||
let (lsn, timeline) = find_end_of_wal(data_dir, seg_size, precise);
|
||||
let wal_dir = data_dir.join(format!("{}", self.get().timelineid));
|
||||
let (lsn, timeline) = find_end_of_wal(&wal_dir, seg_size, precise);
|
||||
(Lsn(lsn), timeline)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user