Ray's Knowledge Base
Unlock

In isolated plugin mode the parent decodes and builds the file's index; the child runs only extension code

DecisionVerified 5 Oct 2026Holds project: dftracer-utils
Decision. The context, the choice, why, and the options that were turned down.

Context#

dftracer-utils isolated plugin mode runs extension code in a child process.

Decision#

In isolated plugin mode (a child process), the main process decodes the trace and builds the file's own index. The child gets each column batch as a sealed block and runs only extension code. A child stages only extension records, and the parent checks that every staged key lies under that extension's key prefix, so a plugin bug cannot reach the file's own index.

The hand-over (create, seal, pass, map) is estimated at about 1% extra, because a chunk takes tens of milliseconds to decode and a hand-over well under one. This is an estimate, not a measurement, so the speed gap is a benchmark gate. The choice exists only where a child exists; Dask workers and MPI ranks run in process, so there is no cost there.

Why#

A plugin bug must not be able to damage the built-in index.

Rejected options#

  • The child builds everything: fastest, but a plugin bug can damage the built-in index.
  • Both sides decode: costs about 2x decode time.

Also found by searching

  • who decodes the trace in isolated plugin mode
  • can an isolated plugin child damage the built-in index
  • child process stages only extension records key prefix check
  • cost of hand-over of column batches to plugin worker