mirror of
https://github.com/neondatabase/neon.git
synced 2026-06-01 04:20:39 +00:00
Fix style
This commit is contained in:
@@ -25,7 +25,7 @@ const TEST_PAGE_CACHE_SIZE: usize = 50;
|
||||
|
||||
enum PageImageState {
|
||||
Vacant, // entry is not used
|
||||
Loaded(Bytes), // page is loaded
|
||||
Loaded(Bytes), // page is loaded
|
||||
Loading(Option<Arc<Condvar>>), // page in process of loading, Condvar is created on demand when some thread need to wait load completion
|
||||
}
|
||||
|
||||
@@ -189,12 +189,7 @@ pub fn remove(key: Key, tenant_id: TenantId, timeline_id: TimelineId) {
|
||||
}
|
||||
|
||||
// Find or load page image in the cache
|
||||
pub fn lookup(
|
||||
timeline: &Timeline,
|
||||
rel: RelTag,
|
||||
blkno: BlockNumber,
|
||||
lsn: Lsn,
|
||||
) -> Result<Bytes> {
|
||||
pub fn lookup(timeline: &Timeline, rel: RelTag, blkno: BlockNumber, lsn: Lsn) -> Result<Bytes> {
|
||||
let key = MaterializedPageHashKey {
|
||||
key: rel_block_to_key(rel, blkno),
|
||||
tenant_id: timeline.tenant_id,
|
||||
|
||||
@@ -584,10 +584,10 @@ impl PageServerHandler {
|
||||
let _profiling_guard = profpoint_start(self.conf, ProfilingConfig::PageRequests);
|
||||
|
||||
let page = if req.latest {
|
||||
page_image_cache::lookup(timeline, req.rel, req.blkno, lsn)?
|
||||
page_image_cache::lookup(timeline, req.rel, req.blkno, lsn)
|
||||
} else {
|
||||
Arc::new(timeline.get_rel_page_at_lsn(req.rel, req.blkno, lsn, false)?)
|
||||
};
|
||||
timeline.get_rel_page_at_lsn(req.rel, req.blkno, lsn, false)
|
||||
}?;
|
||||
Ok(PagestreamBeMessage::GetPage(PagestreamGetPageResponse {
|
||||
page,
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user