This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 63bab882c55 HDDS-15788. Fix SST filtering BOOTSTRAP_LOCK contention
introduced by RocksDB 10 upgrade (#10692)
63bab882c55 is described below
commit 63bab882c550cd371474cba8f92ab5172b144f02
Author: Siyao Meng <[email protected]>
AuthorDate: Thu Jul 9 11:03:38 2026 -0700
HDDS-15788. Fix SST filtering BOOTSTRAP_LOCK contention introduced by
RocksDB 10 upgrade (#10692)
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
---
.../hadoop/hdds/utils/db/managed/ManagedRocksDB.java | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git
a/hadoop-hdds/managed-rocksdb/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedRocksDB.java
b/hadoop-hdds/managed-rocksdb/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedRocksDB.java
index a027b61de85..c348ee30c6d 100644
---
a/hadoop-hdds/managed-rocksdb/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedRocksDB.java
+++
b/hadoop-hdds/managed-rocksdb/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedRocksDB.java
@@ -18,7 +18,6 @@
package org.apache.hadoop.hdds.utils.db.managed;
import java.io.File;
-import java.time.Duration;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -191,11 +190,19 @@ public static ManagedRocksDB openWithLatestOptions(
}
/**
- * Delete the SST file range from rocks db and wait for file deletion.
+ * Delete the SST file range from rocks db.
+ * <p>
+ * {@code deleteFilesInRanges} only drops files that fall entirely within the
+ * range and skips files that are currently being compacted, so it can be a
+ * no-op. Rather than polling the filesystem, verify the outcome against the
+ * live SST metadata: once a file leaves the live metadata it has been
removed
+ * from the LSM (and RocksDB purges the on-disk file), so no wait is needed.
If
+ * the file is still listed, the delete did not take effect and we surface it
+ * so the caller retries instead of assuming success.
* @param columnFamilyHandle column family of the target sst file.
* @param fileToBeDeleted file metadata to be deleted.
* @throws RocksDatabaseException if the underlying db throws an exception
- * or the file is not deleted within a time
limit.
+ * or the delete was a no-op.
*/
public void deleteSstFileRange(
ColumnFamilyHandle columnFamilyHandle,
@@ -211,7 +218,10 @@ public void deleteSstFileRange(
} catch (RocksDBException e) {
throw new RocksDatabaseException("Failed to delete " + file, e);
}
- ManagedRocksObjectUtils.waitForFileDelete(file, Duration.ofSeconds(60));
+ if (getLiveMetadataForSSTFiles(get()).containsKey(
+ FilenameUtils.getBaseName(fileToBeDeleted.fileName()))) {
+ throw new RocksDatabaseException("deleteFilesInRanges was a no-op for "
+ file);
+ }
}
public static Map<String, LiveFileMetaData>
getLiveMetadataForSSTFiles(RocksDB db) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]