mdproctor opened a new issue, #6725:
URL: https://github.com/apache/incubator-kie-drools/issues/6725

   ## Context
   
   After #6715, `disposeUnit()` decrements the adapter refcount for each 
DataStore. If `disposeUnit()` is called twice on the same unit, the second call 
finds no entry in `adapterRefCounts` (already removed on first call) and 
silently no-ops.
   
   ## Problem
   
   Silent no-op on double-dispose hides lifecycle bugs in callers. A unit 
disposed twice indicates an error in the caller's lifecycle management, but the 
engine gives no feedback.
   
   ## Options
   
   1. Throw `IllegalStateException` on double-dispose (strict — forces callers 
to be correct)
   2. Log a warning (lenient — surfaces the bug without crashing)
   3. Track disposed units in a Set and assert (clearer diagnostics)
   
   Option 1 is preferred — vol2 has no external users, breaking callers is the 
point.
   
   Refs #6715


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to