Refactor StreamingCloudFetchProvider struct to use channels\n\nTask ID: task-3.1-refactor-streaming-provider-struct#357
Conversation
…k ID: task-1.1-update-cloudfetch-config
…emove-legacy-types
…-define-pipeline-types
…ask-2.1-implement-scheduler
…ask ID: task-2.2-implement-download-workers
…D: task-3.1-refactor-streaming-provider-struct
…-3.2-add-unit-tests
…sk-3.3-add-integration-tests
|
[High] Cancellation test doesn't actually test cancellation mid-stream The cancellation test reads 3 batches then Restructure so cancellation races with an active download: let provider_for_cancel = Arc::clone(&provider);
tokio::spawn(async move {
tokio::time::sleep(Duration::from_millis(50)).await;
provider_for_cancel.cancel();
});
let mut count = 0;
while let Ok(Some(_)) = provider.next_batch().await {
count += 1;
}
// Should stop before consuming all chunks
assert!(count < total_chunks, "Expected early termination via cancel");This comment was generated with GitHub MCP. |
|
[Medium] Consumer If a worker panics (not just returns Add a timeout as a safety net alongside the cancellation select arm: tokio::select! {
result = handle.result_rx => { ... }
_ = tokio::time::sleep(Duration::from_secs(DEFAULT_CHUNK_READY_TIMEOUT_SECS as u64)) => {
return Err(DatabricksErrorHelper::io()
.message(format!("Timeout waiting for worker result on chunk {}", chunk_index)));
}
_ = self.cancel_token.cancelled() => { ... }
}This comment was generated with GitHub MCP. |
🥞 Stacked PR
Use this link to review incremental changes.
What's Changed
Please fill in a description of the changes here.
This contains breaking changes.
Closes #NNN.