Houlong66 commented on PR #10239:
URL: https://github.com/apache/rocketmq/pull/10239#issuecomment-4177018619
## New commit: Fix AIOOBE from concurrent callback modification
Added commit `81915011cc` to address a related production issue:
```
ArrayIndexOutOfBoundsException: Index 9689 out of bounds for length 9689
at NumberDataPointMarshaler.createRepeated
```
**What changed**: `BatchSplittingMetricExporter.export()` now snapshots all
`MetricData` point collections into new `ArrayList` instances before counting,
splitting, or delegating. This prevents the OTel SDK's marshaler from hitting
AIOOBE when callback threads concurrently modify point collections during
export.
**Impact**: Shallow copy only (object references), ~800KB overhead per
export cycle for 100K data points. Negligible compared to the gRPC export
itself.
This fix works together with the original batch-splitting logic — the
snapshot ensures marshaling safety, while batch-splitting ensures payload size
compliance.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]