Fix sync with hintLength

Signed-off-by: Tianshan Qu <tianshan@xsky.com>
This commit is contained in:
Tianshan Qu 2025-05-15 16:12:14 +08:00
parent 0fd4d9b308
commit 9594f0d0bc

View File

@ -273,7 +273,7 @@ CoTryTask<VersionedLength> BatchedOp::queryLength(const Inode &inode,
XLOGF(DBG, "don't need update {}, current {}, hint {}", inode.id, currLength, *hintLength);
co_return currLength;
}
if (hintLength->truncateVer == currLength.truncateVer && hintLength->length > currLength.truncateVer) {
if (hintLength->truncateVer == currLength.truncateVer && hintLength->length > currLength.length) {
XLOGF(DBG, "update {} to hint {}, current {}", inode.id, *hintLength, currLength);
co_return *hintLength;
}
@ -748,4 +748,4 @@ void BatchedOp::finish(const Result<Inode> &result) {
Operation<Inode>::finish(result);
}
} // namespace hf3fs::meta::server
} // namespace hf3fs::meta::server