sandbox: enforce streaming-only fragment dispatch in analytics-engine#21594
sandbox: enforce streaming-only fragment dispatch in analytics-engine#21594mch2 wants to merge 2 commits intoopensearch-project:mainfrom
Conversation
- delete RowResponseCodec, ResponseCodec, FragmentExecutionResponse, RowBatchToArrowConverter - delete AnalyticsSearchService.executeFragment / collectResponse - require StreamTransportService at injection (fail-fast); force streaming feature flag in sandbox QA clusters - ShardFragmentStageExecution: catch outputSink.feed() exceptions so a feed failure fails the stage instead of hanging to QUERY_TIMEOUT - DatafusionResultStream: synthesise one zero-row schema-bearing batch for empty native streams (Flight requires ≥1 schema frame) - DatafusionPartitionSender: read-write lock around send/close to prevent sender_close UAF while sender_send is mid-await - @AwaitsFix 7 Append/AppendPipe IT methods — Utf8View FFI schema-lie bug, tracked separately Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
PR Reviewer Guide 🔍(Review updated until commit e41c84e)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to e41c84e
Previous suggestionsSuggestions up to commit 7ea7b0a
|
|
❌ Gradle check result for 7ea7b0a: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Thanks for getting this started @mch2 Always happy to see PRs that have a diff like |
- DatafusionReduceSink.feedToSender now calls sender.send() instead of NativeBridge.senderSend() directly, so the read-write lock added on DatafusionPartitionSender actually protects the hot path. - Drop @AwaitsFix on 7 Append/AppendPipe IT methods. The Utf8View schema-lie they hit is fixed by coerceToDeclaredSchema in upstream opensearch-project#21457 (merged here); all 7 now pass. Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
|
Persistent review updated to latest commit e41c84e |
Description
Collapses analytics-engine fragment dispatch to streaming-only. Removes the parallel row-oriented codec layer (
RowResponseCodec,ResponseCodec,FragmentExecutionResponse,RowBatchToArrowConverter) and theexecuteFragment/collectResponseservice methods.AnalyticsSearchTransportServicenow fails fast if the streaming transport feature flag isn't on; sandbox QA clusters set it for us.Bug fixes uncovered by this change - i have pointed ITs for these issues but they are dependent on stubbable transport pr #21581. However, without these fixes the current IT suite fails.
outputSink.feed(...)failure inShardFragmentStageExecutionsurfaced only on the stream's virtual thread;inFlightnever decremented and the stage hung toQUERY_TIMEOUT. Now caught and routed to stage FAILED.DatafusionResultStreamnow synthesises a zero-row schema-carrying batch when the native side yields nothing.DatafusionPartitionSenderUAF —sender_closecould reclaim the heap allocation whilesender_sendheld an immutable borrow across the tokio mpsc await. Send/close now serialise via a read-write lock.Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.