MappingWatcher should not close when mapper throws exception
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 668
- Forks
- 135
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 7
Description
`MappingWatcher` stops watching [when the mapper throws exception](https://github.com/line/centraldogma/blob/461fc63efd657d625eb0760742fc54240ebc3d7c/client/java/src/main/java/com/linecorp/centraldogma/client/MappingWatcher.java#L81-L90).
It's error-prone since the behavior is different from FileWatcher. FileWatcher retries watching [when its mapper throws exception](https://github.com/line/centraldogma/blob/461fc63efd657d625eb0760742fc54240ebc3d7c/client/java/src/main/java/com/linecorp/centraldogma/client/AbstractWatcher.java#L258).
I'd like to suggest fixing `MappingWatcher` not to close on mapper exception.
It makes error handling in mapper function simpler in usual and the behavior matches to `FileWatcher`.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with client/java/src/main/java/com/linecorp/centraldogma/client/MappingWatcher.java, especially the mapper-exception handling around lines 81-90. Compare it with the retry behavior in client/java/src/main/java/com/linecorp/centraldogma/client/AbstractWatcher.java around line 258, then verify that MappingWatcher keeps watching after a mapper exception instead of closing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100