-
Notifications
You must be signed in to change notification settings - Fork 623
Conversation
hi @pmenon, I have reviewed your code and it looks great to me. The original codegen code for delete executor is incomplete: it only contains a simplified logic for deletion. Your code basically matches the logic in However, there are two questions.
|
@yingjunwu Great. Do you see any any required changes? Other answers below:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the code a second time and didn't see any necessity to change the code, as the logic is the same as the old non-codegen code.
@pmenon yes you are right. Regarding to the isolation levels, we don't want to check the isolation level in the codegen version of update/delete executor, right? I think the PR is ready to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It looks like the deletion logic in codegen was incomplete.
Problem: Under SI, as an optimization, the transaction manager doesn't update the last reader field when reading a version created by the current transaction. Then, in the version of
TimestampOrderingTransactionManager::PerformDelete(...)
that is called incodegen::Deleter
, there is a sanity check to ensure that the transaction actually read the version. This will be false because of the aforementioned optimization.Solution: There is an existing
TimestampOrderingTransactionManager::PerformDelete(...)
that doesn't require insertion of an empty version. This is the API we should be using incodgen::Deleter
only in the case where we delete a version we've created. This is the same logic as in the interpreted engine.