The GitHub Actions job "Build and Run Tests by Bazel" on rocketmq.git/develop 
has failed.
Run started by GitHub user lizhimins (triggered by github-actions[bot]).

Head commit for run:
7b85a5d6fc5f1b4a382f878d047feb289f756ec6 / Houlong66 
<[email protected]>
[ISSUE #10240] Add BatchSplittingMetricExporter to prevent OTLP gRPC export 
failures (#10239)

* Add BatchSplittingMetricExporter to prevent OTLP gRPC export failures

When high-cardinality metrics (consumer_group x topic) produce OTLP export
payloads exceeding the gRPC 32MB limit or SLS per-RPC processing limit,
all metrics fail to export. This adds a MetricExporter decorator that:

- Splits large batches of MetricData objects into smaller sub-batches
- Splits single oversized MetricData objects by their internal data points
  into multiple smaller MetricData objects (supports all 7 MetricDataType)
- Configurable via BrokerConfig.metricsExportBatchMaxDataPoints (default 1000)
- Fast path with zero overhead when data points are within threshold
- Logs failed batch details for debugging

* fix(metrics): snapshot MetricData points before export to prevent AIOOBE

The OTel SDK's NumberDataPointMarshaler.createRepeated allocates an
array based on points.size() then iterates. If callback threads
concurrently add data points between size() and iteration, an
ArrayIndexOutOfBoundsException occurs. This adds a defensive snapshot
of all data point collections at the start of export(), ensuring
the delegate exporter always receives immutable point collections.

* test(metrics): add unit tests for snapshot defensive copy

- testSnapshotCreatesNewMetricData: verify delegate receives
  snapshotted MetricData, not the original reference
- testSnapshotFallsBackToOriginal: verify catch block falls
  back to original when snapshot fails (e.g., mock without type)
- testSnapshotPointsAreIndependentCopy: verify the snapshotted
  points collection is a separate instance from the original

Report URL: https://github.com/apache/rocketmq/actions/runs/23936658243

With regards,
GitHub Actions via GitBox

Reply via email to