Skip to content

Commit

Permalink
Do not schedule index upload if timeline do not have disk consistent LSN
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin Knizhnik committed Jun 28, 2024
1 parent af36131 commit 229076b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pageserver/src/tenant/timeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4652,8 +4652,10 @@ impl Timeline {
/// Switch aux file policy and schedule upload to the index part.
pub(crate) fn do_switch_aux_policy(&self, policy: AuxFilePolicy) -> anyhow::Result<()> {
self.last_aux_file_policy.store(Some(policy));
self.remote_client
.schedule_index_upload_for_aux_file_policy_update(Some(policy))?;
if self.get_disk_consistent_lsn().is_valid() {
self.remote_client
.schedule_index_upload_for_aux_file_policy_update(Some(policy))?;
}
Ok(())
}
}
Expand Down

0 comments on commit 229076b

Please sign in to comment.