hudi icon indicating copy to clipboard operation
hudi copied to clipboard

A bug when RocksDBDAO executes the prefixDelete function to delete the last entry

Open MicroGery opened this issue 1 year ago • 3 comments

https://github.com/apache/hudi/blob/8d6d9b98ac7df881e1b67c0dad80606bbe767fda/hudi-common/src/main/java/org/apache/hudi/common/util/collection/RocksDBDAO.java#L397 Whether getRocksDB().delete(lastEntry.getBytes()); should be changed to getRocksDB().delete(managedHandlesMap.get(columnFamilyName), lastEntry.getBytes());

MicroGery avatar Apr 23 '24 08:04 MicroGery

Is this a bug from real production use case or just a code reviewing?

danny0405 avatar Apr 24 '24 01:04 danny0405

Is this a bug from real production use case or just a code reviewing?

Just a code reviewing

MicroGery avatar Apr 24 '24 03:04 MicroGery

It looks reasonable, can you write some simple UT to demonstrate it?

danny0405 avatar Apr 24 '24 05:04 danny0405

Of course, I was a bit busy recently, and now I’m looking into how to write unit tests.

MicroGery avatar May 29 '24 08:05 MicroGery

Fixed in https://github.com/apache/hudi/pull/11531

danny0405 avatar Jul 16 '24 02:07 danny0405