From: sergiyvamz (@sergiyvamz) <noreply+sergiyvamz@github.com>
To: aws/aws-advanced-jdbc-wrapper <noreply+aws-aws-advanced-jdbc-wrapper@github.com>
Subject: Re: [aws/aws-advanced-jdbc-wrapper] PR #2237: feat: add efm3 host monitoring plugin with per-connection registration
Date: Wed, 18 Nov 2026 22:53:01 +0000
Message-ID: <gh-aws-aws-advanced-jdbc-wrapper-2237-rc4621969484@github.com> (raw)
In-Reply-To: <gh-aws-aws-advanced-jdbc-wrapper-2237-rc4621610397@github.com>
References: <gh-aws-aws-advanced-jdbc-wrapper-2237@github.com>
<gh-aws-aws-advanced-jdbc-wrapper-2237-rc4621610397@github.com>
(on wrapper/src/main/java/software/amazon/jdbc/plugin/efm/v3/HostMonitorServiceV3Impl.java:126)
Added MonitorService.stopAndRemove(class, key, expectedMonitor), which removes the entry only if it still holds that instance. It is atomic in MonitorServiceImpl; the interface default is a best-effort fallback so other implementations keep compiling. The service uses it now, and there's a test in MonitorServiceImplTest.