Skip to content

Commit dc56c66

Browse files
committed
swap conditonals
1 parent 731dbba commit dc56c66

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/server/tiered_storage.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -693,15 +693,15 @@ bool TieredStorage::ShouldStash(const PrimeValue& pv) const {
693693
if (pv.IsExternal() || pv.HasStashPending())
694694
return false;
695695

696+
// For now, hash offloading is conditional
697+
if (pv.ObjType() == OBJ_HASH && !config_.experimental_hash_offload)
698+
return false;
699+
696700
// Estimate value size
697701
auto [size, rep] = DetermineSerializationParams(pv);
698702
if (size < config_.min_value_size)
699703
return false;
700704

701-
// For now, hash offloading is conditional
702-
if (pv.ObjType() == OBJ_HASH && !config_.experimental_hash_offload)
703-
return false;
704-
705705
const auto& disk_stats = op_manager_->GetStats().disk_stats;
706706
return disk_stats.allocated_bytes + tiering::kPageSize + size < disk_stats.max_file_size;
707707
}

0 commit comments

Comments
 (0)