Closed brettkail-wk closed 2 years ago
@brettkail-wk thanks for the suggested enhancement! Unfortunately, we have limited engineering capacity and this wasn't selected for our roadmap. If you or any member of our community is interested in submitting a PR for this, we'd be happy to review it!
By default, the OkHttp client silently retries most network I/O errors, and OkHttpPoster does not modify this behavior, so errors are retried without throwing RetryWithBackoffException or similar. The java.net.http client does not, so BatchDataSender logs a warning and then wraps the network I/O error in RetryWithBackoffException, so the two posters cause different observable behavior (much noisier logging from Java11HttpParser). Empirically, the "Connection reset by peer" entwork errors happen quite frequently, so it would be desirable to have consistent behavior for at least that exception between the two posters.
Stack trace
It would also be useful of
BatchDataSender
did not log a warning in addition to rethrowing an exception since that prevents our code from handling the exception and silently retrying, so perhaps that could be downgraded to debug/trace.