`saga`'s `totalCompensation` eagerly throws `CancellationException`
Open
Beginner friendly
- Dominant language
- Kotlin
- Stars
- 6.6k
- Forks
- 472
- Avg merge
- 3d 49m
- Merged PRs (30d)
- 4
Description
`mergeSuppressed` already handles fatal exceptions in `other` properly, so the following line is useless:
```kotlin
acc mergeSuppressed e.nonFatalOrThrow()
```
Even worse, it throws `CancellationException` too eagerly. This doesn't match the behavior of `resourceScope`, for one.
changing it to `acc mergeSuppressed e` would fix the issue!
Contributor guide
Research direction
Locate saga's totalCompensation and inspect the mergeSuppressed call that applies nonFatalOrThrow to the exception. Compare its cancellation behavior with resourceScope, then verify that merging exceptions no longer eagerly throws CancellationException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100