thibaultcha / lua-resty-jit-uuid

Fast and dependency-free UUID library for LuaJIT/ngx_lua
http://thibaultcha.github.io/lua-resty-jit-uuid/
MIT License
205 stars 41 forks source link

bugfix: generated UUID from each factory should be independent #14

Closed spacewander closed 6 years ago

spacewander commented 6 years ago

The buffer should not be shared among factories. By removing the concat out of each call, we also speed up the generation.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.05%) to 92.414% when pulling ae4deb902bccfeed973376853a4fbc323d86968f on spacewander:unshare_buffer into 2718b295f97b4a3739297a9cae8eebf00bf7bc2b on thibaultcha:master.

thibaultcha commented 6 years ago

Thank you for this catch! I merged your patch to master, but also added the same test case for v3 UUID generation which was missing.

Thank you for the patch! I'll make a new version soon.