address comments

This commit is contained in:
Zhe Wang 2025-03-21 15:48:27 -07:00
parent 66fef9af74
commit 876073a2a2
1 changed files with 2 additions and 0 deletions

View File

@ -3794,6 +3794,8 @@ ACTOR Future<Void> releaseExclusiveReadLockByUser(Database cx, RangeLockOwnerNam
ASSERT(currentRangeLockStateSet.isValid());
if (currentRangeLockStateSet.isLockedFor(RangeLockType::ExclusiveReadLock) &&
currentRangeLockStateSet.getAllLockStats()[0].getOwnerUniqueId() == ownerUniqueID) {
// TODO(BulkLoad): krmSetRangeCoalescing per small range is inefficient especially when the lock
// count is over 10K. Optimize this.
wait(krmSetRangeCoalescing(
&tr, rangeLockPrefix, currentRange, normalKeys, rangeLockStateSetValue(RangeLockStateSet())));
wait(tr.commit());