How to propagate downstream errors to the source?
- Dominant language
- JavaScript
- Stars
- 3.4k
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
I'm currently using highland to transform and write rows coming from a database query. I need to release the database connection to a pool when all the rows have streamed through.
Right now, I just observe the source stream and release the connection when the stream is done. This works great.
However, if there's an error thrown somewhere downstream (either in the processing pipeline, or when writing), I want to be notified at the source, that way I can stop pulling rows and release the connection.
So, is there a mechanism to propagate downstream errors to the source?
Contributor guide
Research direction
No files, tests, or entry points are named. Start by tracing Highland's source-stream observation and downstream error-handling behavior, then check whether existing tests cover errors during processing or writing. Done would require a clearly scoped, verified mechanism for notifying the source and releasing the database connection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- stream-processing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100