vx_array_sink->vx_writer, parallel writes#8773
Conversation
|
@claude review in depth, in particular wrt to correctness and write performance |
|
Claude finished @0ax1's task in 4m 5s —— View job Claude PR Review —
|
|
This seems like a weird API? The user pushes chunks from multiple threads, so they're not deterministically ordered? I think you might just want to expose functions for driving the CurrentThreadRuntime. Like "runtime.drive(2 seconds)" and then you just drive the runtime until your 2 seconds timer is up. |
|
I don't think we should expose timers and driving the runtime in general. Presumably user should care about ordering on their side if they want parallel processing. If we want to be on par with Parquet, fastparquet/dask allows partition-based parallelism, and this PR does the same. |
97fa6f5 to
af977fb
Compare
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
af977fb to
3efd921
Compare
Pull request was converted to draft
Allow concurrent vx_writer_push calls. File writes are still serial but encoding process can be done on multiple threads. Since we sit over a thread pool on host threads, user can create a thread pool for maximum performance.
Make vx_writer_free mandatory even after vx_writer_close. This allows to signal failure from vx_writer_push() instead of being a UB as before.
Add a backpressure knob for vx_writer_open to control number of arrays which are allowed to be processed in parallel.
Remove vx_file since it wasn't used anywhere