Skip to content

Fix issue #1398 - SET followed by DELETE does not delete - #1415

Merged
jrgemignani merged 1 commit into
apache:PG13from
rafsun42:issue-1398-PG13
Nov 28, 2023
Merged

jrgemignani merged 1 commit into
apache:PG13from
rafsun42:issue-1398-PG13

Conversation

@rafsun42

Copy link
Copy Markdown
Member

In the DELETE executor, tuples were being locked\deleted using the command ID
returned by GetCurrentCommandId(). However, the original tuples were retrieved
using a command ID stored in the estate.

To fix it- before the retrieval of a tuple, estate command IDs are set using
GetCurrentCommandId() so it matches if the tuple is to be deleted later.

Additional changes:

Fixed an incorrect cypher_delete test. The query
MATCH (n1)-[e]->() DELETE n1, e RETURN n1 should be able to delete n1 and e
without requiring DETACH DELETE.

TODO:

It may be a good idea to audit the executors for any inconsistent use of
command IDs.

In the DELETE executor, tuples were being locked\deleted using the command ID
returned by GetCurrentCommandId(). However, the original tuples were retrieved
using a command ID stored in the estate.

To fix it- before the retrieval of a tuple, estate command IDs are set using
GetCurrentCommandId() so it matches if the tuple is to be deleted later.

Additional changes:
-------------------
Fixed an incorrect cypher_delete test. The query
`MATCH (n1)-[e]->() DELETE n1, e RETURN n1` should be able to delete n1 and e
without requiring DETACH DELETE.

TODO:
-----
It may be a good idea to audit the executors for any inconsistent use of
command IDs.
@github-actions github-actions Bot added the PG13 PostgreSQL13 label Nov 22, 2023
@jrgemignani
jrgemignani merged commit 2d9e370 into apache:PG13 Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PG13 PostgreSQL13

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants