i18n-now opened a new issue, #2162:
URL: https://github.com/apache/kvrocks/issues/2162

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/kvrocks/issues) and found no similar issues.
   
   
   ### Motivation
   
   Kvrocks 是目前开源磁盘 Redis 里面同时支持 Lua 和事务的选型,同时在命令支持上也是比较完善。为了简化实现复杂度,Lua 
和事务相关命令执行时会限制为类似 Redis 的单线程执行。实现方式是在 Lua 和事务相关执行命令加上全局锁,代码如下:
   
   ---
   
   我这个感觉其实可以根据redis lua函数的keys来锁定,不需要做全局锁。
   为了避免兼容问题,可以加一个配置选项,lua_lock_level=global / keys ,确认可以用键级锁的自己打开
   
   ---
   
   Kvrocks is an open-source disk-based Redis that simultaneously supports Lua 
scripts and transactions, and is also quite comprehensive in terms of command 
support. To simplify the complexity of implementation, the execution of Lua 
scripts and transaction-related commands is restricted to single-threaded 
execution similar to Redis. The implementation method involves adding a global 
lock when executing Lua scripts and transaction-related commands.
   
   I think this approach could potentially be modified to lock based on keys 
rather than a global lock. To avoid compatibility issues, a configuration 
option could be added, such as lua_lock_level=global / keys, allowing users to 
enable key-level locking if they confirm it works as expected.
   
   ### Solution
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to