Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
Suppose thread 1 just has passed assertClose() as shown below. Since isClosed is false and counter is 0, thread 2 can call close() successfully. Then, the JVM will crash as described in HDDS-7284.
public void put(ColumnFamily family, byte[] key, byte[] value) throws IOException { assertClose(); // <----------- thread 1, isClosed is false, counter is 0 try { counter.incrementAndGet(); db.get().put(family.getHandle(), writeOptions, key, value); } catch (RocksDBException e) { closeOnError(e, true); throw toIOException(this, "put " + bytes2String(key), e); } finally { counter.decrementAndGet(); } }
Attachments
Issue Links
- is caused by
-
HDDS-7284 JVM crash for rocksdb for read/write after close
- Resolved
- links to