Tracking Issue: Make smol optional in vortex-io

Đang mở
#11,919 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
28/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
build-system

Hướng nghiên cứu

Start from vortex-io/Cargo.toml to see where smol and async-executor are declared, then read vortex-io/src/runtime/platform/native.rs (where block_on is smol::block_on) and locate CurrentThreadRuntime and CurrentThreadWorkerPool alongside the Executor trait and Handle. This is a tracking issue spanning several steps and crates, so the first milestone is the crate split itself and the hosts (DuckDB, CLI, Python and Java bindings) that must depend on it; done means vortex-io builds without smol or async-executor on native targets and no read-path code calls block_on.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

tracking-issue

This is a tracking issue for making smol an optional dependency of vortex-io, so that a host that installs its own Executor does not link it. Part of #9062.

Motivation

On native targets default_handle() returns None: there is no ambient runtime, and every caller installs a Handle. A host with its own executor (Tokio, or a fiber runtime such as ClickHouse's Silk) therefore never runs smol, yet vortex-io/Cargo.toml makes smol and async-executor required dependencies on every non-wasm target, because CurrentThreadRuntime and the worker pool live in vortex-io itself.

platform::block_on (vortex-io/src/runtime/platform/native.rs) is also smol::block_on, which parks the OS thread. Nothing on the scan read path calls it today. Read-path code must keep never calling it: on a fiber host it would block a whole CPU.

Design

Move CurrentThreadRuntime, CurrentThreadWorkerPool and the smol Executor into their own crate, and give it to the hosts that use them (DuckDB, the CLI, the Python and Java bindings). vortex-io keeps the Executor trait, Handle and a dependency-free block_on for tests and synchronous helpers.

Steps

  • Move the smol-backed runtime out of vortex-io into its own crate
  • Hosts that use it depend on the new crate
  • vortex-io builds without smol or async-executor on native targets

Implementation history

Ngôn ngữ chính
Rust
Star
3.2k
Fork
239
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
684

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của vortex-data/vortex

Tất cả issue của vortex-data/vortex

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.