OnTick is called multiple times every tick period
adiprerepa opened this issue · 2 comments
adiprerepa commented
Describe the bug / error
Maybe this is a feature, not a bug, but why does OnTick
result in multiple OnTick calls? An example can be seen here: https://github.com/tetratelabs/proxy-wasm-go-sdk/tree/main/examples/dispatch_call_on_tick.
Digging into it, NewPluginContext
and OnPluginStart
are called multiple times, which (I think) are creating multiple PluginContexts which leads to the issue. Why does this happen? I would expect OnTick
to be called once every period.
cc @mathetake
mathetake commented
Because it's created per worker thread. Please refer to the doc on how it works.
mathetake commented
Note that this is not this SDK specific