Skip to content
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

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

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

rafsun42
Copy link
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
7 checks passed
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