Tracking Issue: Make smol optional in vortex-io

Ouverte
#11,919 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
28/100
Type d'issue
Refactorisation
Clarté
Plutôt claire
Activité
Active
Stack technique
rust
Domaine
build-system

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
Rust
Étoiles
3.2k
Forks
239
Merge moyen
1 j 4 h
PR mergées (30 j)
684

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de vortex-data/vortex

Toutes les issues de vortex-data/vortex

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.