featzhang opened a new pull request, #27357:
URL: https://github.com/apache/flink/pull/27357

   ## What is the purpose of the change
   This PR adds ordered semantics to the async batch operator, building on top 
of:
   PR1: Size-based batching (AsyncBatchWaitOperator)
   PR2: Time-based batching (timeout flush)
   For AI inference workloads and other batch-oriented async operations, users 
may require that output records maintain the same order as input records, even 
when async batch invocations complete out of order. This is essential for 
downstream processing that depends on ordering guarantees.
   
   ## Brief change log
   - Add OrderedAsyncBatchWaitOperator - maintains ordering by assigning 
monotonic sequence numbers to each batch and emitting results strictly in 
sequence order
   - Add OrderedAsyncBatchWaitOperatorFactory - creates ordered operator 
instances
   - Add AsyncDataStream.orderedWaitBatch() API methods as entry points
   - Add comprehensive unit tests in OrderedAsyncBatchWaitOperatorTest
   
   ## Verifying this change
   This change added tests and can be verified as follows:
   - OrderedAsyncBatchWaitOperatorTest#testStrictOrderingGuarantee - verifies 
batches completing out-of-order still produce ordered output
   - OrderedAsyncBatchWaitOperatorTest#testBatchAndTimeoutTriggerWithOrdering - 
verifies ordering preserved across size and time triggered batches
   - OrderedAsyncBatchWaitOperatorTest#testExceptionPropagation - verifies 
exceptions are propagated correctly
   - OrderedAsyncBatchWaitOperatorTest#testDelayedAsyncCompletion - verifies 
delayed completions are handled correctly
   - OrderedAsyncBatchWaitOperatorTest#testManyBatchesOrdering - verifies 
sequence number handling for many batches
   
   ## Does this pull request potentially affect one of the following parts
   - Dependencies (does it add or upgrade a dependency): no
   - The public API, i.e., is any changed class annotated with 
@Public(Evolving): yes (new API methods)
   - The serializers: no
   - The runtime per-record code paths (performance sensitive): no
   - Anything that affects deployment or recovery: no
   - The S3 file system connector: no
   
   ## Documentation
   - Does this pull request introduce a new feature? yes
   - If yes, how is the feature documented? JavaDocs


-- 
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]

Reply via email to