fix: DDL locking session hanging (#90)#297
Open
imranzaheer612 wants to merge 1 commit intoaws:mainfrom
Open
Conversation
Unlock the relation if locked by toplevel transaction and a queued DDL command waiting to be executed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unlock the relation if locked by toplevel transaction and a queued DDL command waiting to be replayed.
Issue #90,
As described in the issue if we try to insert in the same table which is going to be drooped by the
Node 1. Theinsertcommand will apply a lock on the table, as the result whenNode 2will try to replay (dropping the same rel) it will not and will go under a race condition.I tried unlocking the relation and then locking it again after the DDL is replayed. It worked. But I am not sure weather unlocking a relation which was locked by the toptransaction is safe or not. So let me know if the approach looks OK to you. Thanks
Present behavior.
Node 1:
Node 2:
Hanging.
Node 1:
Node 2