Skip to content

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

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

jrgemignani merged 1 commit into
apache:PG11from
rafsun42:issue-1398-PG11

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 PG11 PostgreSQL11 label Nov 22, 2023
@jrgemignani
jrgemignani merged commit 5be3c14 into apache:PG11 Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PG11 PostgreSQL11

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants