Commit 16319a5
committed
[#30703] YSQL: Handle non-BEGIN/COMMIT/INSERT/DELETE records in notifications poller process
Summary:
Currently (before this fix), the notifications poller process throws an error if it encounters a record with an action type other than BEGIN/COMMIT/INSERT/DELETE. Because of the error, the process crashes, a new process starts, receives the same record (since the previous record was not processed and no ack was sent), and the cycle repeats.
Though rare, we can have other record types in future (for instance, DDL record if we add a column to the table). Handle these records by just logging a warning.
Backport-through: 2025.2
Test Plan: ./yb_build.sh --java-test 'org.yb.pgsql.TestPgListenNotify#testNotifyWorksAfterUpdateOnNotificationsTable'
Reviewers: jason
Reviewed By: jason
Subscribers: yql
Differential Revision: https://phorge.dev.yugabyte.com/D530061 parent 7857384 commit 16319a5
2 files changed
Lines changed: 54 additions & 2 deletions
File tree
- java/yb-pgsql/src/test/java/org/yb/pgsql
- src/postgres/src/backend/commands
Lines changed: 52 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
936 | 936 | | |
937 | 937 | | |
938 | 938 | | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
939 | 991 | | |
940 | 992 | | |
941 | 993 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3243 | 3243 | | |
3244 | 3244 | | |
3245 | 3245 | | |
3246 | | - | |
| 3246 | + | |
3247 | 3247 | | |
3248 | | - | |
| 3248 | + | |
3249 | 3249 | | |
3250 | 3250 | | |
3251 | 3251 | | |
| |||
0 commit comments