Tracking Issue: Make smol optional in vortex-io

Offen
#11,919 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
28/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
rust
Bereich
build-system

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
Rust
Sterne
3.2k
Forks
239
Ø Merge
1 T. 4 Std.
Gemergte PRs (30 T.)
684

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus vortex-data/vortex

Alle Issues in vortex-data/vortex

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.