apache / cloudberry

One advanced and mature open-source MPP (Massively Parallel Processing) database. Open source alternative to Greenplum Database.
https://cloudberry.apache.org
Apache License 2.0
418 stars 104 forks source link

[Bug] Unexpected error when update: multiple updates to a row by the same query is not allowed #701

Closed congxuebin closed 1 week ago

congxuebin commented 2 weeks ago

Cloudberry Database version

Cloudberry Database 1.0.0+9b9dd58 build commit:9b9dd5856d002c43efc16e861d05514d08951a00

What happened

/code/cbdb_testrepo_src /code /code/cbdb_testrepo_src/test_framework/tinc.py discover mpp/gpdb/tests/storage/access_methods .... DeltaCompressionTestCase.test_delta_out_of_order_update_delete ... 369.79 ms ... FAIL

The subsequent data miss match. I believe it is due to the update statement failure.

122c120
< UPDATE 15
---
> ERROR:  multiple updates to a row by the same query is not allowed
127,130c125,128
< 1|2147483651|2014-07-29|14:22:23.77689|2014-07-30 14:22:58.356229|2014-07-31 05:22:23.776892+08
< 1|2147483651|2014-07-29|14:22:23.77689|2014-07-30 14:22:58.356229|2014-07-31 05:22:23.776892+08
< 1|2147483651|2014-07-29|14:22:23.77689|2014-07-30 14:22:58.356229|2014-07-31 05:22:23.776892+08
< 2|2147483650|2014-07-29|14:22:23.776899|2014-07-30 14:22:58.35623|2014-07-31 05:22:23.776888+08
---
> 1|2147483648|2014-07-29|14:22:23.77689|2014-07-30 14:22:58.356229|2014-07-31 05:22:23.776892+08
> 1|2147483648|2014-07-29|14:22:23.77689|2014-07-30 14:22:58.356229|2014-07-31 05:22:23.776892+08
> 1|2147483648|2014-07-29|14:22:23.77689|2014-07-30 14:22:58.356229|2014-07-31 05:22:23.776892+08
> 2|2147483630|2014-07-29|14:22:23.776899|2014-07-30 14:22:58.35623|2014-07-31 05:22:23.776888+08
131a130
> 10|2147479999|2014-07-31|14:22:23.778899|2014-07-30 14:22:58.357229|2014-07-31 05:22:23.778899+08
135,136c134
< 10|2147483660|2014-07-31|14:22:23.778899|2014-07-30 14:22:58.357229|2014-07-31 05:22:23.778899+08
< 10|2147483660|2024-07-30|14:22:24.778899|2014-07-30 10:22:31|2014-07-31 05:22:24.776892+08
---
> 10|2147499999|2024-07-30|14:22:24.778899|2014-07-30 10:22:31|2014-07-31 05:22:24.776892+08
139,141c137,139
< 12|2147483661|2014-07-30|14:22:23.776892|2014-07-30 14:22:58.366249|2014-07-31 05:22:23.777899+08
< 13|2147483661|2014-07-30|14:22:23.776892|2014-07-30 14:22:58.366249|2014-07-31 05:22:23.777899+08
< 13|2147483661|2014-07-30|14:22:23.776892|2014-07-30 14:22:58.366249|2014-07-31 05:22:23.777899+08
---
> 12|2147483660|2014-07-30|14:22:23.776892|2014-07-30 14:22:58.366249|2014-07-31 05:22:23.777899+08
> 13|2147483660|2014-07-30|14:22:23.776892|2014-07-30 14:22:58.366249|2014-07-31 05:22:23.777899+08
> 13|2147483660|2014-07-30|14:22:23.776892|2014-07-30 14:22:58.366249|2014-07-31 05:22:23.777899+08

What you think should happen instead

No response

How to reproduce

/code/cbdb_testrepo_src /code /code/cbdb_testrepo_src/test_framework/tinc.py discover mpp/gpdb/tests/storage/access_methods

Operating System

centos7

Anything else

No response

Are you willing to submit PR?

Code of Conduct

congxuebin commented 2 weeks ago

Test outputs and expected results are in the following attachment. DeltaCompressionTestCase.test_delta_out_of_order_update_delete.zip

It is related to PR https://github.com/cloudberrydb/cloudberrydb/pull/603

congxuebin commented 1 week ago

As confirmed with Zijie, these are as expected, thus I updated test cases accordingly.