nickva opened a new pull request, #5555:
URL: https://github.com/apache/couchdb/pull/5555
Previously users noticed periodic `ibrowse_stream_cleanup` crashes.
Replication jobs would restart as expected, but it looks kind of messy and
takes longer.
To improve the situation a bit:
* Increase the number of flushed messages. Flushing is quick so we can
clean a few more messages than 16 if need be, so pick 100.
* If we found the worker was dead, we set the stream status to `ended` but
we didn't actually flush the mailbox, just exited with `ok`. So make sure to
also do the flushing.
* Streamer also emits `ibrowse_async_response_timeout` messages, but we
never flushed those, so make sure do so.
* `ibrowse:stream_next(ReqId)` may fail if the request ID to Pid ets table
was already cleaned. Previously we would then wait for 30 seconds without
getting the response and crash the job. So make sure to catch that error, skip
the wait, set stream status to `ended`, and then continue flushing the mailbox.
* Explicitly assert `ibrowse:stream_next(ReqId)` result is `ok` in cases
when we call it. We'll crash if it isn't and restart the job.
Fix: https://github.com/apache/couchdb/issues/5554
--
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]