envoyproxy/envoy

Lua: global table to store state between threads

Open

#4,027 opened on Aug 1, 2018

View on GitHub
 (8 comments) (3 reactions) (0 assignees)C++ (5,373 forks)batch import
enhancementhelp wanted

Repository metrics

Stars
 (27,997 stars)
PR merge metrics
 (Avg merge 8d) (378 merged PRs in 30d)

Description

Description: Lua state is per worker and it will be non-trivial/impossible to share it between threads. A global storage for Lua is to provide a Lua API that wraps a metadata/table that calls into C++ code with proper locking to set/get items in a global table. All Lua code can access global table and share state in different Envoy Lua filters.

The original request is from #4008

Contributor guide