Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
whl739 opened this issue Mar 25, 2021 · 0 comments · Fixed by #3912
Closed

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

whl739 opened this issue Mar 25, 2021 · 0 comments · Fixed by #3912
Assignees
Labels
bug Something isn't working

Comments

@whl739
Copy link

whl739 commented Mar 25, 2021

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?

@spacewander spacewander self-assigned this Mar 26, 2021
@spacewander spacewander added the bug Something isn't working label Mar 26, 2021
spacewander added a commit to spacewander/incubator-apisix that referenced this issue Mar 26, 2021
spacewander added a commit to spacewander/incubator-apisix that referenced this issue Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants