fdb-record-layer icon indicating copy to clipboard operation
fdb-record-layer copied to clipboard

LazyCursor allows onNext when closed

Open ohadzeliger opened this issue 3 months ago • 1 comments

The LazyCursor allows onNext calls when closed and not initialized. For example, this code snippet does not throw an exception:

LazyCursor<> cursor = new LazyCursor(...);
cursor.close();
cursor.onNext().join();

ohadzeliger avatar Sep 18 '25 19:09 ohadzeliger

Hi Can I take on this Plan: Add a closed-state guard in LazyCursor.onNext() Ensure it either throws an IllegalStateException or returns a failed future when called after close(). Add a unit test to cover the case (close() → onNext() should fail).

AKakkar28 avatar Sep 23 '25 05:09 AKakkar28