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: [email protected]
For additional commands, e-mail: [email protected]