Add BigTableUploadService

This commit is contained in:
Michael Vines 2020-09-04 09:52:02 -07:00
parent bc7731b969
commit bafdcf24f5
2 changed files with 7 additions and 2 deletions

View File

@ -54,11 +54,16 @@ impl BigTableUploadService {
.unwrap() .unwrap()
.highest_confirmed_root(); .highest_confirmed_root();
if max_confirmed_root == starting_slot {
std::thread::sleep(std::time::Duration::from_secs(1));
continue;
}
let result = runtime.block_on(solana_ledger::bigtable_upload::upload_confirmed_blocks( let result = runtime.block_on(solana_ledger::bigtable_upload::upload_confirmed_blocks(
blockstore.clone(), blockstore.clone(),
bigtable_ledger_storage.clone(), bigtable_ledger_storage.clone(),
starting_slot, starting_slot,
None, Some(max_confirmed_root),
true, true,
)); ));

View File

@ -139,7 +139,7 @@ pub async fn upload_confirmed_blocks(
} }
}; };
if i % NUM_BLOCKS_TO_UPLOAD_IN_PARALLEL == 0 { if i > 0 && i % NUM_BLOCKS_TO_UPLOAD_IN_PARALLEL == 0 {
info!( info!(
"{}% of blocks processed ({}/{})", "{}% of blocks processed ({}/{})",
i * 100 / blocks_to_upload.len(), i * 100 / blocks_to_upload.len(),