pjfanning opened a new pull request, #1476:
URL: https://github.com/apache/pekko-connectors/pull/1476
cherry pick 8aa2a6cd6f6bc6d3542a21212cf55299cef09c5c (#1475)
When CollectFile.onPush() was called before the downstream had subscribed to
and pulled the subSource outlet, the unconditional call to subSource.push()
violated Pekko's back-pressure protocol and crashed with:
"Cannot push port (SubSourceOutlet(fileOut)) twice, or before it being
pulled"
Fix: onPush() now checks subSource.isAvailable before pushing. If the
subSource has not yet been pulled, incoming data is accumulated in the existing
buffer and flushed in the subSource's onPull() handler once downstream is ready.
Also fix emitted counter and buffer reset in subPush() before handing off to
readTrailer(), and add tryPullIfNeeded() in subSource.onPull() when more file
content is still expected after flushing the buffer.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]