mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 01:12:56 +00:00
schedule_index_upload: remove unused Option() around metadata param
This commit is contained in:
committed by
Dmitry Rodionov
parent
d7c120574b
commit
ed28ced3bc
@@ -398,7 +398,7 @@ impl RemoteTimelineClient {
|
||||
/// exist in remote storage, they really do.
|
||||
pub fn schedule_index_upload(
|
||||
self: &Arc<Self>,
|
||||
metadata: Option<&TimelineMetadata>,
|
||||
metadata: &TimelineMetadata,
|
||||
) -> anyhow::Result<()> {
|
||||
let mut upload_queue = self.upload_queue.lock().unwrap();
|
||||
ensure!(
|
||||
@@ -406,9 +406,7 @@ impl RemoteTimelineClient {
|
||||
"upload queue not initialized"
|
||||
);
|
||||
|
||||
if let Some(new_metadata) = metadata {
|
||||
upload_queue.latest_metadata = Some(new_metadata.clone());
|
||||
}
|
||||
upload_queue.latest_metadata = Some(metadata.clone());
|
||||
|
||||
let disk_consistent_lsn = upload_queue
|
||||
.latest_metadata
|
||||
@@ -903,7 +901,7 @@ mod tests {
|
||||
|
||||
// Schedule upload of index. Check that it is queued
|
||||
let metadata = dummy_metadata(Lsn(0x20));
|
||||
client.schedule_index_upload(Some(&metadata))?;
|
||||
client.schedule_index_upload(&metadata)?;
|
||||
{
|
||||
let upload_queue = client.upload_queue.lock().unwrap();
|
||||
assert!(upload_queue.queued_operations.len() == 1);
|
||||
|
||||
@@ -1192,7 +1192,7 @@ impl Timeline {
|
||||
if !local_only_filenames.is_empty() {
|
||||
// FIXME this we should merge local and remote metadata, at least remote_consistent_lsn
|
||||
// see comment in download_missing
|
||||
remote_client.schedule_index_upload(Some(&up_to_date_metadata))?;
|
||||
remote_client.schedule_index_upload(&up_to_date_metadata)?;
|
||||
}
|
||||
|
||||
info!("Done");
|
||||
@@ -1765,7 +1765,7 @@ impl Timeline {
|
||||
for (path, layer_metadata) in layer_paths_to_upload {
|
||||
remote_client.schedule_layer_file_upload(&path, &layer_metadata)?;
|
||||
}
|
||||
remote_client.schedule_index_upload(Some(&metadata))?;
|
||||
remote_client.schedule_index_upload(&metadata)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user