Skip to content

Commit

Permalink
Merge pull request #4227 from SirTyson/fix-metric-overflow
Browse files Browse the repository at this point in the history
Fix overflow in incomplete eviction scan check

Reviewed-by: anupsdf
  • Loading branch information
latobarita committed Mar 4, 2024
2 parents fabdb2b + 452f4f5 commit 2a1c456
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bucket/BucketList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,8 @@ BucketList::scanForEviction(Application& app, AbstractLedgerTxn& ltx,
// Check to see if we can finish scanning the bucket before it receives
// an update. To prevent noisy warnings, we assume we have the entire
// period to scan the bucket.
auto period = bucketUpdatePeriod(evictionIter.bucketListLevel,
evictionIter.isCurrBucket);
uint64_t period = bucketUpdatePeriod(evictionIter.bucketListLevel,
evictionIter.isCurrBucket);
if (period * scanSize < b->getSize())
{
CLOG_WARNING(Bucket,
Expand Down

0 comments on commit 2a1c456

Please sign in to comment.