kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

Use Lua vm by default instead of LuaJIT

Open git-hulk opened this issue 3 years ago • 5 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Motivation

LuaJIT can improve the performance a lot in compute intensive scenario, but we didn't test carefully about compatible. So I think we can use the Lua VM by default and guide user to enable it if they need it.

cc @xiaobiaozhao

Solution

No response

Are you willing to submit a PR?

  • [ ] I'm willing to submit a PR!

git-hulk avatar Sep 22 '22 07:09 git-hulk

@git-hulk is there a real use case for this claim? LuaJIT passes all our test cases and if we don't enable new feature by default, it will hardly get feedback to be solid.

I'd say, if you're unconfident with LuaJIT, please build with Lua following these commands: ...

tisonkun avatar Sep 23 '22 10:09 tisonkun

Yes, my concern is we didn't have enough test cases to prove the LuaJIT compatibility, so I think it's too rush to replace Lua VM in the next release. Besides, I think it's fine to enable by default if it's totally a new feature and useful for most users.

Does it sound good to disable by default in next release? I will contact and push users what I know to have a test.

git-hulk avatar Sep 23 '22 10:09 git-hulk

@git-hulk It's reasonable to have a clear signal of stability; otherwise, it's a "pocket" to prevent enabling the feature by default. For example, Flink supports RegionFailoverStrategy in 1.9 and has a determinate target to enable it by default in 1.11. So contributors are encouraged to polish the feature since it will be pushed to production.

Besides, a well-written release note will highlight this change and users should upgrade with awareness.

tisonkun avatar Sep 23 '22 11:09 tisonkun

Yes, agree we should enable new features by default if possible. But it's our first release to involve LuaJIT, so I think it will be better to let users know and try it first, then we can claim clearly that we will enable by default in the next feature.

git-hulk avatar Sep 23 '22 12:09 git-hulk

I don't think there's any question about Luajit's stability. However, if turned on luajit as the default switch, it is not friendly to users who upgrade directly. An important tip for users who need high performance is to enable Luajit.

xiaobiaozhao avatar Sep 23 '22 14:09 xiaobiaozhao

Closed by #916.

tisonkun avatar Oct 04 '22 03:10 tisonkun