oceanbase/miniob

[BUG] Frame::write_unlatch中针对write_locker_校验在RELEASE模式下不应存在

Closed this issue · 3 comments

Describe the bug
在DEBUG模式编译时,Frame::write_latch 函数会对 write_locker_ 进行赋值。然而,在 Frame::write_unlatch 方法中,无论是在RELEASE模式还是DEBUG模式下,都会对 write_locker_ 的值进行断言检查。这导致了在RELEASE模式下编译时,由于 write_locker_ 没有被正确赋值,而无法通过断言检查。

** Environment**
Environment Details sometimes important

  • OS Version:
  • CPU Arch(x86/arm):
  • Compiler:
  • Others:

Fast Reproduce Steps(Required)
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Actual Behavior
What is the result? picture is allowed

Additional context
Add any other context about the problem here.

RELEASE 模式下ASSERT中的代码应该是不执行的:
image

image

你是用RELEASE模式编译时,编译命令是什么?

最初使用的编译命令为 ./build.sh --make -j32,未在 CMakeLists.txt 中启用 CONCURRENCY 导致无法通过 mvcc_trx_log_test 测试。起初误认为是 ASSERT 相关的问题。在启用了 CONCURRENCY 后,测试通过。由于我在观察源码时的疏漏,错误地提交了此 issue,对此表示歉意。

也感谢你发现的问题。我想需要把concurrency改成默认值了