reuvenlax opened a new pull request, #41809: URL: https://github.com/apache/beam/pull/41809
Depends on pr/41803 and pr/41808. Eliminates per-element context, receiver, iterator, and Instant allocations in SimpleDoFnRunner: Reuses a single DoFnProcessContext instance across @ProcessElement invocations (clearing elem and namespace in finally, with fail-fast reentrancy checks). Has DoFnProcessContext implement OutputBuilderSupplier directly and caches DirectOutputReceiver (main output), outputRowReceiver, and CachedMultiOutputReceiver (with identity-cached fast paths for the main tag and sole extra output tag). Uses WindowedValues.singleWindowOrNull() to skip explodeWindows() and Iterables.getOnlyElement() on single-window elements, and avoids OpenTelemetry Scope allocation when context is null or already active. Caches allowedTimestampSkew and validates timestamps with primitive long arithmetic on the fast path, and short-circuits outputWindowedValue tag validation on tag == mainOutputTag. Adds comprehensive unit tests in SimpleDoFnRunnerTest covering context reuse/reentrancy/exception cleanup, multi-output/row/direct receivers, timestamp skew boundaries, empty-window preservation, and OpenTelemetry context propagation. -- 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]
