Skip to content

Backport(v1.19): output: treat JSON::GeneratorError as unrecoverable error (#5419)#5423

Open
github-actions[bot] wants to merge 1 commit into
v1.19from
backport-to-v1.19/pr5419
Open

Backport(v1.19): output: treat JSON::GeneratorError as unrecoverable error (#5419)#5423
github-actions[bot] wants to merge 1 commit into
v1.19from
backport-to-v1.19/pr5419

Conversation

@github-actions

Copy link
Copy Markdown

Which issue(s) this PR fixes:
Backport #5419
Fixes #5414

What this PR does / why we need it:
When JSON generation fails for content reasons (e.g. non-UTF-8 bytes, NaN/Infinity), JSON.generate raises JSON::GeneratorError.
This is deterministic for a given chunk, so retrying can never succeed and the chunk should be treated as a bad chunk.

Docs Changes:
N/A

Release Note:

  • output: treat JSON::GeneratorError as unrecoverable error

**Which issue(s) this PR fixes**:
Fixes #5414

**What this PR does / why we need it**:
When JSON generation fails for content reasons (e.g. non-UTF-8 bytes,
NaN/Infinity), `JSON.generate` raises `JSON::GeneratorError`.
This is deterministic for a given chunk, so retrying can never succeed
and the chunk should be treated as a bad chunk.

**Docs Changes**:
N/A

**Release Note**:
* output: treat JSON::GeneratorError as unrecoverable error

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant