bigplum / lua-resty-mongol

A ngx_lua driver for mongodb -- Deprecated for not updating with the mongodb version
198 stars 67 forks source link

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

Open jicvi opened 4 years ago

jicvi commented 4 years ago

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'