tkhurana opened a new pull request, #2669: URL: https://github.com/apache/phoenix/pull/2669
getOrCreate ran init() inside INSTANCES.computeIfAbsent, so HDFS and ZK work held a map lock and a failed init() could not be closed, leaking its consumer, writer, store-and-forward status task and registered listeners. Each blocked caller also re-ran a failing init(). - Reserve the slot with putIfAbsent and run init() outside the map; callers that find a group still initializing wait for it and share its outcome. A RuntimeException from init reaches them as IOException, so it does not abort the RegionServer from a coprocessor hook. - A failed init() closes the group; close() waits for any init in progress and skips what was never built. StoreAndForwardModeImpl.onEnter undoes a partial entry. - Leave the per-group metrics sources registered on close: they are singletons the group's next instance reuses. Merge the two metrics source factories. - No-op groups: a NOT_ACTIVE group is created per call and carries its HA group name instead of a shared nameless sentinel. NoOpReplicationLogGroup has one constructor (server, name, status), and the shared NONE is named "NONE". -- 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]
