Caideyipi commented on PR #17666:
URL: https://github.com/apache/iotdb/pull/17666#issuecomment-6848783669

   Independent re-review completed for reviewed head 
`6f2cc670214385796d95b94d27db34384b78534e`.
   
   I inspected the full 22-file PR diff and related metadata, metric, 
event-callback, and cleanup paths, with particular attention to 
`d7e2c2e00e9fc249a9036848ade31fa43f10be8f` and the subsequent fixes. This 
session contains one complete review round.
   
   Two P2 behavior issues were found and fixed in 
`ca5d222e2265078b9fcd0ffc48b23b4ea308b8c9`:
   
   - **Late floating-memory acquisition was omitted while its release was still 
charged.** An in-flight shared assigner can retain a matched source after its 
pipe metadata is removed. The liveness guard in 
`PipeTaskAgent.addFloatingMemoryUsageInByte` skipped that acquisition, but the 
corresponding release could subtract from outstanding usage, undercount it, and 
leave a negative/stale counter. Every actual acquisition is now recorded, 
including after drop; the existing per-key cleanup removes the counter after 
the matching releases reach zero. Two deterministic regressions cover both an 
outstanding counter and a counter that was already cleaned up.
   - **A passive schema metric callback could recreate a removed listener.** 
`IoTDBNonDataRegionSource.getUnTransferredEventCount()` used the creating queue 
accessor, so a callback after schema-region cleanup could reinsert listener 
state. The schema source now reads only an existing listener, returns zero 
after closure, and computes from one captured queue. A deterministic regression 
covers metric reads after region cleanup and after source closure.
   
   The previously fixed late metric-creation/deregistration race is closed in 
the reviewed paths: the exact pipe-instance liveness check and operator 
insertion occur under the same metrics monitor used by deregistration, with 
metadata removal before deregistration. I found no additional lock-order 
inversion, deadlock, or obvious performance regression in those paths. The 
deterministic tests exercise the relevant lifecycle boundaries; no IT was added 
because ordinary cluster activity cannot reliably force these precise callback 
orders without production test hooks.
   
   Validation:
   
   - Spotless apply passed for both affected modules with the integration-test 
profile.
   - The offline clean 28-module reactor completed successfully with all 482 
goals executed and the build cache disabled. All 37 selected unit tests passed, 
with zero failures, errors, or skips. All three newly added regressions ran 
locally. Required source dependencies were rebuilt before the reactor run.
   - `forbiddenapis` was skipped using `-Dforbiddenapis.skip=true` because of 
the previously reported corrupt dependency archive; that check is not claimed 
as passing. The previously reported remote Maven Central/JitPack access failure 
remains a verification limitation. Remote CI was not awaited and is not claimed 
as passing.
   
   Separate pre-existing follow-up, left unchanged: the remaining-event 
operator retains closed schema source instances in `schemaRegionSources` until 
the entire pipe is deregistered. Repeated leader changes can therefore retain 
old source objects. This round prevents their late metric reads from recreating 
listeners.
   
   Final local commit, confirmed `apache/iotdb:potential-leak` head, and 
confirmed PR head all match `ca5d222e2265078b9fcd0ffc48b23b4ea308b8c9`. The PR 
remains **draft** because this round found behavior issues; the updated full 
diff requires a fresh independent review before marking ready. No second review 
round was run in this session.


-- 
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]

Reply via email to