Fix indentation

This commit is contained in:
Konstantin Knizhnik
2021-11-22 19:22:59 +03:00
parent f73d043a8b
commit 13f9565ff8
4 changed files with 9 additions and 11 deletions

View File

@@ -123,7 +123,7 @@ impl CfgFileParams {
listen_http_addr: self.listen_http_addr.or(other.listen_http_addr),
checkpoint_distance: self.checkpoint_distance.or(other.checkpoint_distance),
checkpoint_period: self.checkpoint_period.or(other.checkpoint_period),
reconstruct_threshold: self.reconstruct_threshold.or(other.reconstruct_threshold),
reconstruct_threshold: self.reconstruct_threshold.or(other.reconstruct_threshold),
gc_horizon: self.gc_horizon.or(other.gc_horizon),
gc_period: self.gc_period.or(other.gc_period),
pg_distrib_dir: self.pg_distrib_dir.or(other.pg_distrib_dir),
@@ -244,7 +244,7 @@ impl CfgFileParams {
listen_http_addr,
checkpoint_distance,
checkpoint_period,
reconstruct_threshold,
reconstruct_threshold,
gc_horizon,
gc_period,

View File

@@ -1897,7 +1897,7 @@ impl<'a> BufferedTimelineWriter<'a> {
*/
}
if store.data.commit_lsn + self.tl.conf.checkpoint_distance < lsn {
store.data.commit(lsn)?;
store.data.commit(lsn)?;
self.tl.disk_consistent_lsn.store(lsn);
}
Ok(())
@@ -2000,11 +2000,9 @@ impl<'a> TimelineWriter for BufferedTimelineWriter<'a> {
///
fn checkpoint(&self) -> Result<()> {
let mut store = self.tl.store.write().unwrap();
let lsn = self.tl.get_last_record_lsn();
let lsn = self.tl.get_last_record_lsn();
store.data.commit(lsn)?;
self.tl
.disk_consistent_lsn
.store(lsn);
self.tl.disk_consistent_lsn.store(lsn);
Ok(())
}

View File

@@ -152,7 +152,7 @@ impl PageServerConf {
daemonize: false,
checkpoint_distance: defaults::DEFAULT_CHECKPOINT_DISTANCE,
checkpoint_period: Duration::from_secs(10),
reconstruct_threshold: defaults::DEFAULT_RECONSTRUCT_THRESHOLD,
reconstruct_threshold: defaults::DEFAULT_RECONSTRUCT_THRESHOLD,
gc_horizon: defaults::DEFAULT_GC_HORIZON,
gc_period: Duration::from_secs(10),
listen_pg_addr: defaults::DEFAULT_PG_LISTEN_ADDR.to_string(),

View File

@@ -10,7 +10,7 @@ use yakv::storage::{Key, Storage, StorageConfig, StorageIterator, Value};
const TOAST_SEGMENT_SIZE: usize = 2 * 1024;
const CACHE_SIZE: usize = 32 * 1024; // 256Mb
//const CACHE_SIZE: usize = 128 * 1024; // 1Gb
//const CACHE_SIZE: usize = 128 * 1024; // 1Gb
///
/// Toast storage consistof two KV databases: one for storing main index
@@ -128,7 +128,7 @@ impl ToastStore {
&path.join("pageserver.db"),
StorageConfig {
cache_size: CACHE_SIZE,
nosync: false,
nosync: false,
},
)?,
commit_lsn: Lsn(0),
@@ -174,7 +174,7 @@ impl ToastStore {
pub fn commit(&mut self, commit_lsn: Lsn) -> Result<()> {
let mut tx = self.db.start_transaction();
tx.commit()?;
self.commit_lsn = commit_lsn;
self.commit_lsn = commit_lsn;
Ok(())
}