camunda / zeebe-process-test

Testing project for Camunda Platform 8
39 stars 14 forks source link

fix: db transaction inconsistencies when deleting keys #1139

Closed megglos closed 3 months ago

megglos commented 3 months ago

Description

The main cause of https://github.com/camunda/zeebe-process-test/issues/1001 was the bug fixed via 77e162c5f9017df616b683aa2236ba50218698e8 . Within the same transaction you couldn't insert a previously deleted key, this happened as after processing the first processes complete command a new message start event correlation was triggered, failing as the previous active process instance was still in the database as the transaction wasn't commited and deleted keys of the transaction weren't checked.

I also noticed there was a bug in the get by key method, not checking the deletedKeys set either and fixed that too with bf9e1eb5c34f2d11387443253ba60dfdf03e11ed .

I verified the fix as well with the test case provided in the original issue, I decided against adding it though as the unit test covers the behavior of the db transaction that was the cause of the message start event test case failing.

Related issues

closes #1001

github-actions[bot] commented 3 months ago

Test Results

 50 files   50 suites   1m 39s :stopwatch: 138 tests 138 :white_check_mark: 0 :zzz: 0 :x: 438 runs  438 :white_check_mark: 0 :zzz: 0 :x:

Results for commit bf9e1eb5.

korthout commented 3 months ago

@megglos There is already a release-8.5.0 branch, so you may want to also backport this there

megglos commented 3 months ago

bors merge

zeebe-bors-camunda[bot] commented 3 months ago

Build failed:

megglos commented 3 months ago

bors retry

flake

zeebe-bors-camunda[bot] commented 3 months ago

Build succeeded:

backport-action commented 3 months ago

Successfully created backport PR for stable/8.1:

backport-action commented 3 months ago

Successfully created backport PR for stable/8.2:

backport-action commented 3 months ago

Successfully created backport PR for stable/8.3:

backport-action commented 3 months ago

Successfully created backport PR for stable/8.4:

backport-action commented 3 months ago

Successfully created backport PR for release-8.5.0: