vectordotdev / vectordotdev/vector

Move execution of `lua` transform into a separate thread

Open
#2,200 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

domain: reliability needs: approval transform: lua type: tech debt
Dominant language
Rust
Stars
22.6k
Forks
2.3k
Avg merge
1d 7h
Merged PRs (30d)
146

Description

Currently Lua transform (both version 1 and version 2) execute the user-defined code inside a Tokio thread. However, if the user-defined code hangs, for example because of an infinite loop, it might stop entire topology if there are no other available threads.

It can be fixed by moving the runtime code into a separate thread, and then making this separate thread communicate with the Tokio threads using channels.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Lua transform version 1 and version 2 execution paths and how they run on Tokio threads. Inspect the proposed channel boundary between Tokio and a separate runtime thread; done means user code that hangs no longer stops the topology and both transform versions continue communicating correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, rust
Domain
stream-processing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.