-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Some commands forgot to mark meta track calls unstable failed cases. #504
Labels
type: Bug
Something isn't working
Comments
Drop policy CREATE POLICY p1 ON t1 FOR SELECT USING (a % 2 = 0);
CREATE POLICY
gpadmin=# select * from pg_stat_last_operation;
classid | objid | staactionname | stasysid | stausename | stasubtype | statime
---------+-------+---------------+----------+------------+------------+-------------------------------
2615 | 16385 | CREATE | 10 | gpadmin | SCHEMA | 2024-07-08 13:57:18.716533+08
1259 | 16386 | CREATE | 10 | gpadmin | TABLE | 2024-07-08 14:11:12.50767+08
3256 | 16389 | CREATE | 10 | gpadmin | POLICY | 2024-07-08 14:11:46.778425+08
(3 rows)
drop policy p1 on t1;
DROP POLICY
gpadmin=# select * from pg_stat_last_operation;
classid | objid | staactionname | stasysid | stausename | stasubtype | statime
---------+-------+---------------+----------+------------+------------+-------------------------------
2615 | 16385 | CREATE | 10 | gpadmin | SCHEMA | 2024-07-08 13:57:18.716533+08
1259 | 16386 | CREATE | 10 | gpadmin | TABLE | 2024-07-08 14:11:12.50767+08
3256 | 16389 | CREATE | 10 | gpadmin | POLICY | 2024-07-08 14:11:46.778425+08
(3 rows) |
drop publication CREATE PUBLICATION dummy_pub;
gpadmin=# select * from pg_stat_last_operation;
classid | objid | staactionname | stasysid | stausename | stasubtype | statime
---------+-------+---------------+----------+------------+-------------+-------------------------------
2615 | 16385 | CREATE | 10 | gpadmin | SCHEMA | 2024-07-08 13:57:18.716533+08
1259 | 16386 | CREATE | 10 | gpadmin | TABLE | 2024-07-08 14:11:12.50767+08
3256 | 16389 | CREATE | 10 | gpadmin | POLICY | 2024-07-08 14:11:46.778425+08
6104 | 16390 | CREATE | 10 | gpadmin | PUBLICATION | 2024-07-08 14:13:53.60819+08
(4 rows)
drop PUBLICATION dummy_pub;
DROP PUBLICATION
gpadmin=# select * from pg_stat_last_operation;
classid | objid | staactionname | stasysid | stausename | stasubtype | statime
---------+-------+---------------+----------+------------+-------------+-------------------------------
2615 | 16385 | CREATE | 10 | gpadmin | SCHEMA | 2024-07-08 13:57:18.716533+08
1259 | 16386 | CREATE | 10 | gpadmin | TABLE | 2024-07-08 14:11:12.50767+08
3256 | 16389 | CREATE | 10 | gpadmin | POLICY | 2024-07-08 14:11:46.778425+08
6104 | 16390 | CREATE | 10 | gpadmin | PUBLICATION | 2024-07-08 14:13:53.60819+08
(4 rows) |
avamingli
added a commit
to avamingli/cloudberrydb
that referenced
this issue
Jul 8, 2024
Issue apache#504 It will make unstable cases failed as: ERROR: duplicate key value violates unique constraint "pg_statlastop_classid_objid_staactionname_index" Call MetaTrackDropObject in functions: RemoveSchemaById RemovePublicationById RemovePolicyById Authored-by: Zhang Mingli avamingli@gmail.com
9 tasks
avamingli
added a commit
to avamingli/cloudberrydb
that referenced
this issue
Jul 8, 2024
Issue apache#504 It will make unstable cases failed as: ERROR: duplicate key value violates unique constraint "pg_statlastop_classid_objid_staactionname_index" Call MetaTrackDropObject in functions: RemoveSchemaById RemovePublicationById RemovePolicyById Authored-by: Zhang Mingli avamingli@gmail.com
avamingli
added a commit
to avamingli/cloudberrydb
that referenced
this issue
Jul 9, 2024
Issue apache#504 It will make unstable cases failed as: ERROR: duplicate key value violates unique constraint "pg_statlastop_classid_objid_staactionname_index" Call MetaTrackDropObject in functions: RemoveSchemaById RemovePublicationById RemovePolicyById Authored-by: Zhang Mingli avamingli@gmail.com
avamingli
added a commit
that referenced
this issue
Jul 9, 2024
Issue #504 It will make unstable cases failed as: ERROR: duplicate key value violates unique constraint "pg_statlastop_classid_objid_staactionname_index" Call MetaTrackDropObject in functions: RemoveSchemaById RemovePublicationById RemovePolicyById Authored-by: Zhang Mingli avamingli@gmail.com
Fixed by #505 |
foreyes
pushed a commit
to foreyes/cloudberrydb
that referenced
this issue
Sep 20, 2024
Issue apache#504 It will make unstable cases failed as: ERROR: duplicate key value violates unique constraint "pg_statlastop_classid_objid_staactionname_index" Call MetaTrackDropObject in functions: RemoveSchemaById RemovePublicationById RemovePolicyById Authored-by: Zhang Mingli avamingli@gmail.com (cherry picked from commit 472db76)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cloudberry Database version
What happened
Unstable case:
What you think should happen instead
Drop Schema command forget to drop meta track object.
While reading the codes, I find there are several places have the same issue.
When some oids are used again, it will report error due to the unique index.
How to reproduce
Operating System
Linux i-v3roa8c2 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: