remove old timeline init code

This commit is contained in:
Stas Kelvich
2024-09-12 18:20:13 +01:00
parent b81dbc887b
commit 3a452d8f56

View File

@@ -385,84 +385,3 @@ async fn read_all_bytes(reader: &mut (impl AsyncRead + Unpin)) -> anyhow::Result
reader.read_to_end(&mut buf).await?;
Ok(Bytes::from(buf))
}
///////////////////////////////
// Set up timeline
// most of that is needed for image_layer_writer.finish()
// refactoring finish might be a better idea
///////////////////////////////
// let shard_id = ShardIdentity::unsharded();
// let tli = TimelineId::generate();
// let aaa_atc = Arc::new(ArcSwap::from(Arc::new(atc)));
// let tl_metadata = TimelineMetadata::new(
// Lsn(0),
// None,
// None,
// Lsn(0),
// Lsn(4242),
// Lsn(4242),
// 16,
// );
// let tc = models::TenantConfig {
// ..models::TenantConfig::default()
// };
// let atc = AttachedTenantConf::try_from(LocationConf::attached_single(
// TenantConfOpt{
// ..Default::default()
// },
// Generation::new(42),
// &ShardParameters::default(),
// ))?;
// // let walredo_mgr = Arc::new(WalRedoManager::from(TestRedoManager));
// let config = RemoteStorageConfig {
// storage: RemoteStorageKind::LocalFs {
// local_path: Utf8PathBuf::from("remote")
// },
// timeout: RemoteStorageConfig::DEFAULT_TIMEOUT,
// };
// let remote_storage = GenericRemoteStorage::from_config(&config).await.unwrap();
// let deletion_queue = MockDeletionQueue::new(Some(remote_storage.clone()));
// let remote_client = RemoteTimelineClient::new(
// remote_storage,
// deletion_queue.new_client(),
// &conf,
// tsi,
// tli,
// Generation::Valid(42),
// );
// let resources = TimelineResources {
// remote_client,
// timeline_get_throttle: tenant.timeline_get_throttle.clone(),
// l0_flush_global_state: tenant.l0_flush_global_state.clone(),
// };
// let timeline = Timeline::new(
// &conf,
// aaa_atc,
// &tl_metadata,
// None,
// tli,
// TenantShardId {
// tenant_id: tni,
// shard_number: ShardNumber(0),
// shard_count: ShardCount(0)
// },
// Generation::Valid(42),
// shard_id,
// None,
// resources,
// 16,
// state,
// last_aux_file_policy,
// self.cancel.child_token(),
// );