Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

Commit

Permalink
Fixed an infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
chotchki committed Oct 9, 2021
1 parent cc6a60e commit a4bea6f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/engine/io/block_layer/free_space_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl FreeSpaceManager {
// Note: due to possible timing issues the next page might not be sequentially
// next so we will check again on the next loop

let (_, next_guard) = self.file_manager.get_next_offset(&page_id).await?;
let (_, next_guard) = self.file_manager.get_next_offset(&free_id).await?;

let mut buffer = BytesMut::with_capacity(PAGE_SIZE as usize);
let new_page = vec![FreeStat::Free as u8; PAGE_SIZE as usize];
Expand All @@ -60,8 +60,6 @@ impl FreeSpaceManager {
self.file_manager
.add_page(next_guard, buffer.freeze())
.await?;

offset += PageOffset(1);
}
}
}
Expand Down

0 comments on commit a4bea6f

Please sign in to comment.