dpol1 opened a new pull request, #3058:
URL: https://github.com/apache/hugegraph/pull/3058
## Purpose of the PR
close apache/hugegraph#3033
`storeEventListenStatus` had the same owner-first-close bug #3017 fixed
for graph cache listeners: non-owner `close()` dropped the tracking entry
and skipped `unlisten()` as a no-op, leaving the owner's listener
registered but untracked — leak + no store-event cache invalidation.
## Main Changes
- **`CachedGraphTransaction`**: add `StoreListenerHolder` inner class
(listener, provider, refCount) + `STORE_EVENT_LISTENERS` static
registry; acquire/release via `ConcurrentMap.compute()` with
provider-identity guard for graph close/reopen. TODO block removed.
- **`GraphTransaction`**: remove `storeEventListenStatus` declaration
and orphaned `ConcurrentHashMap` import.
- **`CachedGraphTransactionTest`**: delete
`restoreStoreListenerStatusForKnownTeardownBug` workaround; repoint
reflection helper to `STORE_EVENT_LISTENERS`; add 2 regression tests.
`CachedSchemaTransaction*` unaffected — per-instance, balanced 1:1.
## Verifying these changes
- [x] Need tests and can be verified as follows:
- RED/GREEN TDD: new tests failed on master (`NoSuchFieldException` on
`STORE_EVENT_LISTENERS`), green after fix.
- 36/36 pass: `CachedGraphTransactionTest`, `CachedSchemaTransactionTest`,
`CacheManagerTest`, `CacheTest`
## Does this PR potentially affect the following parts?
- [x] Nope
## Documentation Status
- [x] `Doc - No Need`
--
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]