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

writing a global lua variable ('resty') which may lead to race conditions between concurrent requests, so prefer the use of 'local' variables #19

Open
jicvi opened this issue Jun 10, 2020 · 3 comments

Comments

@jicvi
Copy link

jicvi commented Jun 10, 2020

What's wrong with this?

_G write guard:12: writing a global lua variable ('resty') which may lead to race conditions between concurrent requests, so prefer the use of 'local' variables
stack traceback:
[C]: in function 'module'
lualib/resty/mongol/init.lua:1: in main chunk
[C]: in function 'require'

@hanxi
Copy link

hanxi commented Jun 10, 2020

openresty?

@jicvi
Copy link
Author

jicvi commented Jun 10, 2020

yes

@hzm199822
Copy link

oh,I have encountered as like as two peas. How did you solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants