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

   Checked the corresponding realtime paths at 
`f3471f3a13b2716590c463e6a623e1069438c051`; no equivalent change was identified 
as necessary for these two historical-extraction fixes.
   
   - **Time filtering:** In `TsFileProcessor.endFile()`, `writer.endFile()` 
completes before `listenToTsFile(...)` publishes the realtime TsFile event. The 
resource's closed flag is set later by the close callbacks, but the realtime 
notification follows the final flush and file finalization. This differs from 
historical extraction, which can select the resource while its asynchronous 
close is still in progress and observe incomplete time bounds. The PR therefore 
preserves realtime behavior, covered by 
`testRealtimeTsFileTimeParsingRemainsUnchanged`.
   - **Reference acquisition:** The realtime TsFile source already holds an 
event reference while it is queued. If acquiring the reference for supply 
fails, it reports a `PipeRuntimeNonCriticalException`, invalidates the 
DataRegion completion state, and removes the corresponding TsFile 
progress-index entry. The historical case instead retains a source-owned 
resource pin and queue entry, allowing reference acquisition to be retried 
without consuming the file. These are different ownership and failure paths, so 
the historical retry change should not be copied mechanically into realtime 
extraction.
   
   Relevant code: 
[TsFileProcessor.endFile()](https://github.com/apache/iotdb/blob/f3471f3a13b2716590c463e6a623e1069438c051/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessor.java)
 and [realtime TsFile 
supply](https://github.com/apache/iotdb/blob/f3471f3a13b2716590c463e6a623e1069438c051/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionTsFileSource.java).
   
   This follow-up was based on code inspection; no additional code changes, 
builds, or test runs were made for it.


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