[fix] StatsOutputStream: add string write function (#308) #23227
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
On a specific environment /metrics end point timed out consistently, logs contained the exception below.
Applied fix has resolved the issue.
The fix does not make much sense as String implements CharSequence, so I suspect we hit some weird issue with JIT or jvm.
The JDK is Timurin build 17.0.12+7, I could not repro this locally but it consistently happened in the env.
Modifications
Added method that takes String parameter explicitly.
Such method existed up until the change #22494
Verifying this change
Verified in the env where the problem reproduces
Does this pull request potentially affect one of the following parts:
NO
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: datastax#308