Fix conflicts with main branch

This commit is contained in:
Konstantin Knizhnik
2021-05-20 14:39:27 +03:00
parent 20b6279beb
commit 3645133700
6 changed files with 7 additions and 13 deletions

View File

@@ -3,7 +3,7 @@ use std::sync::Arc;
use std::time::SystemTime; use std::time::SystemTime;
use std::{thread, time}; use std::{thread, time};
use control_plane::compute::{PostgresNode, ComputeControlPlane}; use control_plane::compute::{ComputeControlPlane, PostgresNode};
use integration_tests; use integration_tests;
use integration_tests::PostgresNodeExt; use integration_tests::PostgresNodeExt;

View File

@@ -376,7 +376,6 @@ impl RocksTimeline {
Ok(0) Ok(0)
} }
fn do_gc(&self, conf: &'static PageServerConf) -> Result<Bytes> { fn do_gc(&self, conf: &'static PageServerConf) -> Result<Bytes> {
loop { loop {
thread::sleep(conf.gc_period); thread::sleep(conf.gc_period);

View File

@@ -196,7 +196,6 @@ fn walreceiver_main(
while let Some((lsn, recdata)) = waldecoder.poll_decode()? { while let Some((lsn, recdata)) = waldecoder.poll_decode()? {
let old_checkpoint_bytes = encode_checkpoint(checkpoint); let old_checkpoint_bytes = encode_checkpoint(checkpoint);
//info!("Decode WAL record at LSN {}", lsn);
let decoded = decode_wal_record(&mut checkpoint, recdata.clone()); let decoded = decode_wal_record(&mut checkpoint, recdata.clone());
timeline.save_decoded_record(decoded, recdata, lsn)?; timeline.save_decoded_record(decoded, recdata, lsn)?;

View File

@@ -293,10 +293,6 @@ impl PostgresRedoManagerInternal {
let mut status = 0; let mut status = 0;
if info == pg_constants::XLOG_XACT_COMMIT { if info == pg_constants::XLOG_XACT_COMMIT {
status = pg_constants::TRANSACTION_STATUS_COMMITTED; status = pg_constants::TRANSACTION_STATUS_COMMITTED;
info!(
"Mark transaction {} as committed at LSN {}",
xlogrec.xl_xid, lsn
);
transaction_id_set_status(xlogrec.xl_xid, status, &mut page); transaction_id_set_status(xlogrec.xl_xid, status, &mut page);
//handle subtrans //handle subtrans
let _xact_time = buf.get_i64_le(); let _xact_time = buf.get_i64_le();

View File

@@ -360,7 +360,7 @@ impl ReceiveWalConn {
const ZERO_BLOCK: &[u8] = &[0u8; XLOG_BLCKSZ]; const ZERO_BLOCK: &[u8] = &[0u8; XLOG_BLCKSZ];
/* Extract WAL location for this block */ /* Extract WAL location for this block */
let mut xlogoff = start_pos.segment_offset(wal_seg_size as u64) as usize; let mut xlogoff = start_pos.segment_offset(wal_seg_size) as usize;
while bytes_left != 0 { while bytes_left != 0 {
let bytes_to_write; let bytes_to_write;
@@ -376,7 +376,7 @@ impl ReceiveWalConn {
} }
/* Open file */ /* Open file */
let segno = start_pos.segment_number(wal_seg_size as u64); let segno = start_pos.segment_number(wal_seg_size);
let wal_file_name = XLogFileName(timeline, segno, wal_seg_size); let wal_file_name = XLogFileName(timeline, segno, wal_seg_size);
let wal_file_path = self let wal_file_path = self
.conf .conf
@@ -435,7 +435,7 @@ impl ReceiveWalConn {
xlogoff += bytes_to_write; xlogoff += bytes_to_write;
/* Did we reach the end of a WAL segment? */ /* Did we reach the end of a WAL segment? */
if start_pos.segment_offset(wal_seg_size as u64) == 0 { if start_pos.segment_offset(wal_seg_size) == 0 {
xlogoff = 0; xlogoff = 0;
if partial { if partial {
fs::rename(&wal_file_partial_path, &wal_file_path)?; fs::rename(&wal_file_partial_path, &wal_file_path)?;

View File

@@ -175,7 +175,7 @@ impl ReplicationConn {
Some(file) => file, Some(file) => file,
None => { None => {
// Open a new file. // Open a new file.
let segno = start_pos.segment_number(wal_seg_size as u64); let segno = start_pos.segment_number(wal_seg_size);
let wal_file_name = XLogFileName(timeline, segno, wal_seg_size); let wal_file_name = XLogFileName(timeline, segno, wal_seg_size);
let timeline_id = self.timeline.get().timelineid.to_string(); let timeline_id = self.timeline.get().timelineid.to_string();
let wal_file_path = self.conf.data_dir.join(timeline_id).join(wal_file_name); let wal_file_path = self.conf.data_dir.join(timeline_id).join(wal_file_name);
@@ -183,7 +183,7 @@ impl ReplicationConn {
} }
}; };
let xlogoff = start_pos.segment_offset(wal_seg_size as u64) as usize; let xlogoff = start_pos.segment_offset(wal_seg_size) as usize;
// How much to read and send in message? We cannot cross the WAL file // How much to read and send in message? We cannot cross the WAL file
// boundary, and we don't want send more than MAX_SEND_SIZE. // boundary, and we don't want send more than MAX_SEND_SIZE.
@@ -223,7 +223,7 @@ impl ReplicationConn {
// Decide whether to reuse this file. If we don't set wal_file here // Decide whether to reuse this file. If we don't set wal_file here
// a new file will be opened next time. // a new file will be opened next time.
if start_pos.segment_offset(wal_seg_size as u64) != 0 { if start_pos.segment_offset(wal_seg_size) != 0 {
wal_file = Some(file); wal_file = Some(file);
} }
} }