Update upload_confirmed_blocks() return value when no blocks to upload (#33861)
upload_confirmed_blocks() states that it will return the passed in ending_slot when there are no blocks to upload. This is enforced in one early return but not the other. The result is that BigTableUploadService could potentially get stuck in a loop of trying to upload the same slot. While this case seems to be caused when an operator restarts their node without --no-snapshot-fetch (which can cause a gap in blockstore), we can still be friendly and allow them to break out of this loop.
This commit is contained in:
parent
70107e2196
commit
a799a90a62
|
@ -138,7 +138,7 @@ pub async fn upload_confirmed_blocks(
|
|||
"No blocks between {} and {} need to be uploaded to bigtable",
|
||||
starting_slot, ending_slot
|
||||
);
|
||||
return Ok(last_blockstore_slot);
|
||||
return Ok(ending_slot);
|
||||
}
|
||||
let last_slot = *blocks_to_upload.last().unwrap();
|
||||
info!(
|
||||
|
|
Loading…
Reference in New Issue