This is an automated email from the ASF dual-hosted git repository.
JingsongLi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-rust.git
The following commit(s) were added to refs/heads/main by this push:
new 0834a0c fix(vortex): avoid footer read deadlock (#402)
0834a0c is described below
commit 0834a0c9aeb045a082ef202077042b0d9eb3f077
Author: QuakeWang <[email protected]>
AuthorDate: Mon Jun 22 10:11:27 2026 +0800
fix(vortex): avoid footer read deadlock (#402)
Upgrade Vortex to a version where unknown plugin policy reads no longer
lazily write session state while footer layout decoding holds a layout registry
borrow.
Adapt Arrow conversion to the Vortex session execution API and keep
constant_time_eq below 0.5.0 so a fresh resolver remains compatible with Rust
1.91.
---
Cargo.toml | 4 ++--
crates/paimon/Cargo.toml | 2 +-
crates/paimon/src/arrow/format/vortex.rs | 20 ++++++++++++++------
3 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index cd45c34..a669a2a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,7 +25,7 @@ edition = "2021"
homepage = "https://paimon.apache.org/docs/rust/"
repository = "https://github.com/apache/paimon-rust"
license = "Apache-2.0"
-rust-version = "1.86.0"
+rust-version = "1.91.0"
[workspace.dependencies]
arrow = "58.0"
@@ -40,6 +40,6 @@ datafusion = "53.0.0"
datafusion-ffi = "53.0.0"
paimon = { version = "0.3.0", path = "crates/paimon" }
parquet = "58.0"
-constant_time_eq = ">=0.4.0, <0.5.1"
+constant_time_eq = ">=0.4.0, <0.5.0"
tokio = "1.39.2"
tokio-util = "0.7"
diff --git a/crates/paimon/Cargo.toml b/crates/paimon/Cargo.toml
index 9f2b08b..e79c129 100644
--- a/crates/paimon/Cargo.toml
+++ b/crates/paimon/Cargo.toml
@@ -104,7 +104,7 @@ tantivy = { version = "0.22", optional = true }
tempfile = { version = "3", optional = true }
paimon-mosaic-core = { version = "0.1.0", optional = true }
paimon-vindex-core = "0.1.0"
-vortex = { version = "0.68", features = ["tokio"], optional = true }
+vortex = { version = "0.75.0", features = ["tokio"], optional = true }
libloading = "0.9"
# Keep CI on the dependency set that passed before unicode-segmentation 1.13.3.
# The 1.13.3 resolver update correlates with Linux Vortex tests hanging.
diff --git a/crates/paimon/src/arrow/format/vortex.rs
b/crates/paimon/src/arrow/format/vortex.rs
index 2a77e13..88eb16e 100644
--- a/crates/paimon/src/arrow/format/vortex.rs
+++ b/crates/paimon/src/arrow/format/vortex.rs
@@ -30,14 +30,14 @@ use arrow_ord::cmp::{
eq as arrow_eq, gt as arrow_gt, gt_eq as arrow_gt_eq, lt as arrow_lt,
lt_eq as arrow_lt_eq,
neq as arrow_neq,
};
-use arrow_schema::{ArrowError, DataType as ArrowDataType, SchemaRef};
+use arrow_schema::{ArrowError, DataType as ArrowDataType, Field, SchemaRef};
use async_trait::async_trait;
use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::{Arc, OnceLock};
-use vortex::array::arrow::{FromArrowArray, IntoArrowArray};
+use vortex::array::arrow::{ArrowSessionExt, FromArrowArray};
use vortex::array::dtype::arrow::FromArrowType;
use vortex::array::dtype::DType;
-use vortex::array::ArrayRef;
+use vortex::array::{ArrayRef, VortexSessionExecute};
use vortex::buffer::ByteBuffer;
use vortex::file::{OpenOptionsSessionExt, WriteOptionsSessionExt};
use vortex::io::runtime::current::CurrentThreadRuntime;
@@ -225,7 +225,7 @@ fn read_vortex_batches(
else {
continue;
};
- let batch = vortex_array_to_record_batch(vortex_array, &scan_schema)?;
+ let batch = vortex_array_to_record_batch(&session, vortex_array,
&scan_schema)?;
batches.push(filter_and_project_batch(
batch,
&target_schema,
@@ -840,11 +840,19 @@ fn row_ranges_to_selection(ranges: &[RowRange],
total_rows: u64) -> Selection {
/// Convert a Vortex ArrayRef to an Arrow RecordBatch.
fn vortex_array_to_record_batch(
+ session: &VortexSession,
vortex_array: ArrayRef,
schema: &SchemaRef,
) -> crate::Result<RecordBatch> {
- let arrow_array = vortex_array
- .into_arrow(&ArrowDataType::Struct(schema.fields().clone()))
+ let target_field = Field::new(
+ "",
+ ArrowDataType::Struct(schema.fields().clone()),
+ vortex_array.dtype().is_nullable(),
+ );
+ let mut ctx = session.create_execution_ctx();
+ let arrow_array = session
+ .arrow()
+ .execute_arrow(vortex_array, Some(&target_field), &mut ctx)
.map_err(|e| Error::DataInvalid {
message: format!("Failed to convert Vortex array to Arrow: {e}"),
source: None,