mirror of
https://github.com/neondatabase/neon.git
synced 2026-06-04 22:10:39 +00:00
deletion queue: versions in keys
This commit is contained in:
@@ -573,17 +573,33 @@ impl PageServerConf {
|
||||
}
|
||||
|
||||
pub fn remote_deletion_list_path(&self, sequence: u64) -> RemotePath {
|
||||
RemotePath::new(
|
||||
&self
|
||||
.remote_deletion_node_prefix()
|
||||
.join(format!("{:016x}.list", sequence)),
|
||||
)
|
||||
// Encode a version in the key, so that if we ever switch away from JSON we can
|
||||
// increment this.
|
||||
const VERSION: u8 = 1;
|
||||
|
||||
// Placeholder, pending implementation of generation numbers
|
||||
const GENERATION: u32 = 0;
|
||||
|
||||
RemotePath::new(&self.remote_deletion_node_prefix().join(format!(
|
||||
"{sequence:016x}-{GENERATION:08x}-{VERSION:02x}.list"
|
||||
)))
|
||||
.expect("This should always be convertible, it is relative")
|
||||
}
|
||||
|
||||
pub fn remote_deletion_header_path(&self) -> RemotePath {
|
||||
RemotePath::new(&self.remote_deletion_node_prefix().join("header"))
|
||||
.expect("This should always be convertible, it is relative")
|
||||
// Encode a version in the key, so that if we ever switch away from JSON we can
|
||||
// increment this.
|
||||
const VERSION: u8 = 1;
|
||||
|
||||
// Placeholder, pending implementation of generation numbers
|
||||
const GENERATION: u32 = 0;
|
||||
|
||||
RemotePath::new(
|
||||
&self
|
||||
.remote_deletion_node_prefix()
|
||||
.join(format!("header-{GENERATION:08x}-{VERSION:02x}")),
|
||||
)
|
||||
.expect("This should always be convertible, it is relative")
|
||||
}
|
||||
|
||||
pub fn tenant_path(&self, tenant_id: &TenantId) -> PathBuf {
|
||||
|
||||
@@ -598,7 +598,6 @@ impl FrontendQueueWorker {
|
||||
.await?;
|
||||
|
||||
debug!("Loaded {} keys in deletion prefix {}", lists.len(), prefix);
|
||||
|
||||
let list_name_pattern =
|
||||
Regex::new("([a-zA-Z0-9]{16})-([a-zA-Z0-9]{8})-([a-zA-Z0-9]{2}).list").unwrap();
|
||||
|
||||
@@ -630,8 +629,6 @@ impl FrontendQueueWorker {
|
||||
continue;
|
||||
};
|
||||
|
||||
info!("seq_part {seq_part}");
|
||||
|
||||
let seq: u64 = match u64::from_str_radix(seq_part, 16) {
|
||||
Ok(s) => s,
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user