Priyesh K created HDDS-14799:
--------------------------------
Summary: Handle RocksDB Close State in Iterator next() / hasNext()
to Prevent Failures
Key: HDDS-14799
URL: https://issues.apache.org/jira/browse/HDDS-14799
Project: Apache Ozone
Issue Type: Improvement
Reporter: Priyesh K
Currently, the RocksDB iterator methods {{next()}} and {{hasNext()}} rely on
{{isValid()}} to determine whether the iterator can move forward. However, this
check does not verify whether the underlying RocksDB instance is still open.
There is a potential race condition where:
* The iterator is obtained while RocksDB is open.
* After some time, RocksDB may get closed.
* Next calls to {{next()}} or {{hasNext()}} only check {{isValid()}} and do
not validate whether the DB is still open.
In such scenarios, calling {{next()}} or {{hasNext()}} may result in unexpected
failures or exceptions because the underlying database has already been closed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]