Skip to content

bug: error-log-logger call ngx.worker.id() in privileged agent #3911

Description

@whl739

In plugin error-log-logger:

function _M.init()
    timers.register_timer("plugin#error-log-logger", process, true)
end

this timer will run on privileged agent, but in function process, it will call ngx.worker.id(), whitch will return nil.

local function process()
    ....
    local id = ngx.worker.id()
    ....
    buffers[id] = log_buffer
    ....
end

it seems a bug, did i miss something?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions