已关闭
[Bug]: 事务外已 LISTEN 的通道,事务内重复 LISTEN 后 COMMIT 丢失 NOTIFY 消息 #8489
songfei创建于  9月8日关闭于  9月17日
songfei
songfei成员
9月8日 创建

测试类型

SQL功能

测试版本

7.0.0LTS

问题描述

接收方会话在事务外先执行 LISTEN ch1,然后开启事务并在事务内再次执行 LISTEN ch1。此时发送方执行 NOTIFY ch1,接收方 COMMIT 后未收到 NOTIFY 消息。

操作系统和硬件信息

Linux localhost 4.19.90-24.4.v2101.ky10.aarch64 #1 SMP Mon May 24 14:45:37 CST 2021 aarch64 aarch64 aarch64 GNU/Linux

测试环境

企业版单机

被测功能

预置条件

兼容D库

操作步骤

--prestep1:切换D库;expect:执行成功
show sql_compatibility;

--prestep2:创建测试用户;expect:执行成功
DROP USER IF EXISTS U_notify_Case0054;
CREATE USER U_notify_Case0054 WITH PASSWORD 'Test@123';

--step1:接收方会话A开启事务执行LISTEN ch1(不提交);expect:执行成功
LISTEN ch1;
BEGIN;
LISTEN ch1;

--step2:发送方会话B执行NOTIFY ch1;expect:执行成功
\c - U_notify_Case0054/Test@123
NOTIFY ch1, 'uncommitted_listen';

--step3:接收方会话A提交事务;expect:执行成功
COMMIT;

预期输出

COMMIT 后,会话 A 应收到 NOTIFY 消息,payload 为 uncommitted_listen

实际输出

COMMIT 后,未收到NOTIFY消息,继续执行select 1; 才收到

日志信息

无

提单组织

联合伙伴

测试代码

likedislike
songfeisongfei成员
9月8日 添加了label:bug
songfeisongfei成员
9月8日 关联了看板:openGauss 7.0.0-LTS
opengauss_bot
opengauss_bot成员
9月8日 评论:

Welcome To openGauss Community

Hey @songfei_sz , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.

Contact Guide

If you have any questions, please contact the SIG: StorageEngine, AI, CM, CloudNative, SecurityTechnology, SQLEngine ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @libiao2024, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @wofanzheng, @ywzq1161327784 ,
and any of the committers: @Igali, @bihua111, @cailei19, @h_ray, @levy53071, @libiao2024, @lihaixiao, @mrzack, @wangfeihuo, @wuyuechuan, @xiong_xjun, @zhangfengzhi123, @zhangxubo, @zhangzq131, @zjh_hw .

likedislike
opengauss_botopengauss_bot成员
9月8日 添加了label:sig/SQLEngine
yelingzhiyelingzhi成员
9月8日 关联了pull request:修复事务中收到NOTIFY消息时无法在commit后立刻显示消息的问题
yelingzhiyelingzhi成员
9月9日 关联了pull request:修复事务中收到NOTIFY消息时无法在commit后立刻显示消息的问题,回合7.0.0
ywzq1161327784ywzq1161327784成员
9月10日 issue状态由 待办的 改变为 待回归
songfeisongfei成员
9月17日 issue状态由 待回归 改变为 已验收
songfeisongfei成员
9月17日 关闭了 issue
songfei
songfei成员
9月17日 评论:

db_d=# listen ch1;
LISTEN
db_d=# begin;
BEGIN
db_d=# listen ch1;
LISTEN
db_d=# commit;
COMMIT
Asynchronous notification "ch1" with payload "uncommitted_listen" received from server process with PID 121785483.
likedislike
shijuzheng1997
shijuzheng1997成员
11 天前 评论:

转测包
8.0.0-RC1 B001
20261010开发自验:
图片.png

likedislike
zyc
zyc成员
7 天前 评论:

回归版本:8.0.0RC1 B001
回归结论:回归通过
回归过程:

image.png

likedislike