You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Devesh Kumar Singh (Jira)" <ji...@apache.org> on 2025/11/14 09:25:00 UTC
[jira] [Created] (HDDS-13927) Recon - OM Db delta updates handler resource cleanup
Devesh Kumar Singh created HDDS-13927:
-----------------------------------------
Summary: Recon - OM Db delta updates handler resource cleanup
Key: HDDS-13927
URL: https://issues.apache.org/jira/browse/HDDS-13927
Project: Apache Ozone
Issue Type: Task
Components: Ozone Recon
Affects Versions: 2.0.0
Reporter: Devesh Kumar Singh
Assignee: Devesh Kumar Singh
h2. *Specific Failure Scenarios When OMDbUpdatesHandler could still hold some references*
h3. *Scenario 1: Exception During Batch Processing*
try (OMDBUpdatesHandler omdbUpdatesHandler = new OMDBUpdatesHandler(omMetadataManager)) {
for (byte[] data : dbUpdates.getData()) {
try (ManagedWriteBatch writeBatch = new ManagedWriteBatch(data)) {
writeBatch.iterate(omdbUpdatesHandler); // Handler stores references to RocksDB objects
// EXCEPTION OCCURS HERE (e.g., RocksDBException during commit)
rdbBatchOperation.commit(rocksDB, wOpts);
} // writeBatch.close() called, but omdbUpdatesHandler still holds references!
}
} // omdbUpdatesHandler "close" called, but it's a no-op since no close() method exists
*Result:* RocksDB handles, iterators, and memory remain allocated indefinitely.
h3. *Scenario 2: Interrupted Thread*
try (OMDBUpdatesHandler omdbUpdatesHandler = new OMDBUpdatesHandler(omMetadataManager)) {
// Thread gets interrupted during long-running operation
if (Thread.currentThread().isInterrupted()) {
throw new InterruptedException("Thread interrupted during delta update.");
}
// omdbUpdatesHandler has already accessed tables and created internal resources
// Interrupt causes immediate exit without proper cleanup
}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org