luoluoyuyu commented on PR #18441:
URL: https://github.com/apache/iotdb/pull/18441#issuecomment-5338909982

   1. Synchronous tablet generation assumption for custom processors. The 
current mechanism relies on process(TsFileInsertionEvent, ...) generating and 
collecting all tablets synchronously before the TsFile event itself is 
committed. The built-in DoNothingProcessor (passes the TsFile event through as 
a whole) and the default PipeProcessor.process(TsFileInsertionEvent) (iterates 
toTabletInsertionEvents() synchronously) both satisfy this. But if a 
third-party processor stores the toTabletInsertionEvents() iterable and 
consumes it later, the TsFile event may already be committed while the 
generated-tablet count is still 0, causing it to be marked transferred 
immediately and letting region-level downgrading exit early. Please document 
this constraint explicitly, or add a safe boundary when 
generatedTabletInsertionEventCount == 0.
   
   2. Transferred hook may not fire if a single event is discarded without 
closing the pipe. Today close() resets inFlightTsFileCount, so dropping the 
pipe is a safe fallback. However, if an already-supplied TsFile event, or one 
of its generated tablet events, is directly cleared/released while the pipe is 
still alive, clearTsFileEpochAfterCommit may never run and region-level 
downgrading recovery can stay stuck with inFlightTsFileCount > 0. Please verify 
that all single-event cleanup paths either reach close() or explicitly 
compensate the in-flight counter.


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