mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-10 15:02:56 +00:00
Walkeeper safe info (#408)
* Align prev record CRC on 8-bytes boundary * Upadate safekeeper in-memory status on receiving message from WAL proposer
This commit is contained in:
committed by
GitHub
parent
b607f0fd8e
commit
0ee2e16b17
@@ -247,8 +247,8 @@ impl ReceiveWalConn {
|
||||
my_info.server.timeline = timeline;
|
||||
|
||||
info!(
|
||||
"find_end_of_wal in {:?}: timeline={} flush_lsn={}",
|
||||
&self.conf.data_dir, timeline, flush_lsn
|
||||
"find_end_of_wal in {:?}: timeline={} flush_lsn={}, restart_lsn={}",
|
||||
&self.conf.data_dir, timeline, flush_lsn, my_info.restart_lsn
|
||||
);
|
||||
|
||||
/* Report my identifier to proposer */
|
||||
@@ -332,6 +332,7 @@ impl ReceiveWalConn {
|
||||
* maximum (vcl) determined by WAL proposer during handshake.
|
||||
* Switching epoch means that node completes recovery and start writing in the WAL new data.
|
||||
*/
|
||||
self.timeline.get().set_info(&my_info);
|
||||
if my_info.epoch < prop.epoch && end_pos > max(my_info.flush_lsn, prop.vcl) {
|
||||
info!("Switch to new epoch {}", prop.epoch);
|
||||
my_info.epoch = prop.epoch; /* bump epoch */
|
||||
|
||||
Reference in New Issue
Block a user