mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-13 00:12:54 +00:00
Fix indentation
This commit is contained in:
@@ -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,
|
||||
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user