CadyLinn commented on code in PR #23490:
URL: https://github.com/apache/datafusion/pull/23490#discussion_r3791673636
##########
datafusion/datasource/src/write/orchestration.rs:
##########
@@ -251,8 +296,32 @@ pub async fn spawn_writer_tasks_and_join(
compression_level: Option<u32>,
object_store: Arc<dyn ObjectStore>,
demux_task: SpawnedTask<Result<()>>,
+ file_stream_rx: DemuxedStreamReceiver,
+) -> Result<u64> {
+ spawn_writer_tasks_and_join_with_metrics(
+ context,
+ serializer,
+ StatelessWriterOptions::new(compression)
+ .with_compression_level(compression_level),
+ object_store,
+ demux_task,
+ file_stream_rx,
+ )
+ .await
+}
+
+/// Like [`spawn_writer_tasks_and_join`], and also records common file sink
metrics.
+pub async fn spawn_writer_tasks_and_join_with_metrics(
+ context: &Arc<TaskContext>,
+ serializer: Arc<dyn BatchSerializer>,
+ options: StatelessWriterOptions<'_>,
+ object_store: Arc<dyn ObjectStore>,
+ demux_task: SpawnedTask<Result<()>>,
mut file_stream_rx: DemuxedStreamReceiver,
) -> Result<u64> {
+ let _timer = options
Review Comment:
Thanks for the suggestion. Addressed in commit 6275636.
I moved the elapsed_compute timer into the per-batch serialization task and
scoped it around BatchSerializer::serialize. It no longer includes channel
waits, writer I/O, object-store latency, or task coordination.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]