mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-20 14:40:37 +00:00
This introduces a new tree data structure for holding intervals, and queries of the form "which intervals contain the given point?". It then uses that to store the Layers in the layer map, instead of the BTreeMap. While we don't currently create overlapping layers in the page server, that situation might arise in the future if we start to create extra layers for performance purposes, or as part of some multi-stage garbage collection operation that creates new layers in some interval and then removes old ones. The situation might also arise if you have multiple page servers running on the same timeline, freezing layers at different points, and both uploading them to S3. So even though overlapping layers might not happen currently, let's avoid getting confused if it does happen for some reason. Fixes https://github.com/zenithdb/zenith/issues/517.
37 lines
857 B
Rust
37 lines
857 B
Rust
//! zenith_utils is intended to be a place to put code that is shared
|
|
//! between other crates in this repository.
|
|
|
|
#![allow(clippy::manual_range_contains)]
|
|
|
|
/// `Lsn` type implements common tasks on Log Sequence Numbers
|
|
pub mod lsn;
|
|
/// SeqWait allows waiting for a future sequence number to arrive
|
|
pub mod seqwait;
|
|
|
|
// Async version of SeqWait. Currently unused.
|
|
// pub mod seqwait_async;
|
|
|
|
pub mod bin_ser;
|
|
pub mod postgres_backend;
|
|
pub mod pq_proto;
|
|
|
|
// dealing with connstring parsing and handy access to it's parts
|
|
pub mod connstring;
|
|
|
|
// common authentication routines
|
|
pub mod auth;
|
|
|
|
// utility functions and helper traits for unified unique id generation/serialization etc.
|
|
pub mod zid;
|
|
// http endpoint utils
|
|
pub mod http;
|
|
|
|
// socket splitting utils
|
|
pub mod sock_split;
|
|
|
|
// common log initialisation routine
|
|
pub mod logging;
|
|
|
|
// Misc
|
|
pub mod accum;
|