fix(hstore): invalidate graph registration after clear - #3141
Conversation
Signed-off-by: ulofiai <monsterking@tutamail.com>
imbajin
left a comment
There was a problem hiding this comment.
Blocking: no. Summary: The production change clears the stale registration marker after graph deletion, but the added regression test only exercises the private helper and does not validate the public clear/recreate lifecycle. Evidence: Static review of HstoreSessionsImpl.clear() and HstoreSessionsImplTest.testClearInitializedGraphStateRepeatedly(); no CI checks reported for this exact head.
| try { | ||
| for (int i = 0; i < 50; i++) { | ||
| Assert.assertTrue(initializedGraphs.add(graphName)); | ||
| clearInitializedGraph.invoke(null, graphName); |
There was a problem hiding this comment.
clearInitializedGraph() via reflection instead of exercising HstoreSessionsImpl.clear(). It would still pass if the finally call at HstoreSessionsImpl.java:188 were removed or misplaced, and it does not verify the reported clear/recreate lifecycle. Please cover the public clear path (ideally the repeated clear/recreate sequence) and assert that a subsequent open re-registers the graph, or use controllable fakes to verify that behavior.
Fixes the HStore clear/recreate lifecycle defect described in #3090.
This focused change invalidates the local
infoInitializedGraphmarker after a successful store-side graph deletion. The marker is cleared in afinallyblock, so a lateropen()can re-register the same graph even when the PD deletion call reports an error.A regression test repeats the initialization-state add/clear transition 50 times to guard against stale JVM lifecycle state.
Validation:
git diff --checkMaven tests were not run because Maven is unavailable in the execution image.