399 Star 1.3K Fork 1.5K

GVPopenGauss / openGauss-server

 / 详情

【测试类型:SQL功能】【测试版本:3.1.1】 【资源池化】锁等待超时,主节点获取X锁,备节点获取S锁,锁冲突,等待锁超时时间备节点处于等待状态

已验收
缺陷
创建于  
2022-12-01 11:11

【标题描述】:锁等待超时,主机获取X锁后备机获取S锁冲突,等待超时时间后,备节点处于等待中
【测试类型:SQL功能】【测试版本:3.1.1】 【资源池化】
锁等待超时,主机获取X锁后备机获取S锁冲突,等待超时时间后,备节点应报错提示锁超时,实际处于等待状态
【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a):
openEuler release 20.03 (LTS)
Linux linux208178 4.19.90-2003.4.0.0036.oe1.x86_64 #1 SMP Mon Mar 23 19:10:41 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
【测试环境】(单机/1主x备x级联备):
1主1备
【被测功能】:
锁超时
【测试类型】:
功能测试
【数据库版本】(查询命令: gaussdb –V):
gaussdb (openGauss 3.1.0 build f23a81e7) compiled at 2022-11-30 20:07:46 commit 0 last mr
【预置条件】:
在共享存储环境下
【操作步骤】(请填写详细的操作步骤):
--step1:锁等待超时参数设置,主备均设置 expect:设置成功
gs_guc reload -D /data/opt/openGauss/cluster/data1/dn1 -c "allow_concurrent_tuple_update= on"
gs_guc reload -D /data/opt/openGauss/cluster/data1/dn1 -c "update_lockwait_timeout= 30000"
gs_guc reload -D /data/opt/openGauss/cluster/data1/dn1 -c "lockwait_timeout= 30000"

--step2:创建测试表 expect:创建成功
drop table if exists t_dms_ock_0062 cascade;
create table t_dms_ock_0062(id int, name varchar, source number) with (segment=on);
insert into t_dms_ock_0062 values (1,'haha',92),(2,'tutu',85);

--step3: 主节点获取X锁,不提交 expect:获取成功
begin;
drop table t_dms_ock_0062;

--step4:备节点获取S锁 expect:执行阻塞
begin;
select * from t_dms_ock_0062;

--step5:等待锁超时时间,是否释放锁 expect:预期S锁等待超时报错

【预期输出】:
S锁 等待超时报错
【实际输出】:
S锁 处于等待状态
【原因分析】:

  1. 这个问题的根因
  2. 问题推断过程
  3. 还有哪些原因可能造成类似现象
  4. 该问题是否有临时规避措施
  5. 问题解决方案
  6. 预计修复问题时间

【日志信息】(请附上日志文件、截图、coredump信息):

【测试代码】:

评论 (3)

chengyao25 创建了缺陷

Hey @chengyao25, Welcome to openGauss Community.
All of the projects in openGauss Community are maintained by @opengauss-bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at Here to find the details.

Hi @chengyao25, please use the command /sig xxx to add a SIG label to this issue.
For example: /sig sqlengine or /sig storageengine or /sig om or /sig ai and so on.
You can find more SIG labels from Here.
If you have no idea about that, please contact with @xiangxinyong , @zhangxubo .

陈栋 任务状态待办的 修改为已确认
陈栋 任务状态已确认 修改为修复中
陈栋 通过opengauss/openGauss-server Pull Request !2522任务状态修复中 修改为已完成
chengyao25 修改了描述
chengyao25 修改了标题

回归通过;
回归版本:
gaussdb (openGauss 3.1.0 build 41c3b9d7) compiled at 2022-12-08 20:07:33 commit 0 last mr
回归结果:
主节点:
输入图片说明
备节点:
输入图片说明

chengyao25 任务状态已完成 修改为测试中
chengyao25 任务状态测试中 修改为已验收

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
5622128 opengauss bot 1581905080
C++
1
https://gitee.com/opengauss/openGauss-server.git
git@gitee.com:opengauss/openGauss-server.git
opengauss
openGauss-server
openGauss-server

搜索帮助