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

Close open portals after receiving PortalSuspended #949

Closed

Conversation

imalsogreg
Copy link

I used some printf debugging to determine that PortalSuspended message is received during a call to wait_until_ready(). This probably means that wait_until_ready() is being called at the wrong time? However, handling PortalSuspended here by sending another Execute command, as the psql spec suggests, solves the multiple-portal issue we see with CockroachDB.

@robo-corg and I are working on a similar patch that puts the handler in a less surprising place. But I'm opening this PR in case you're interested in a quick fix, or in case this helps us see how the protocol handling should be changed.

Fixes #933 and subsumes #944

@mehcode
Copy link
Member

mehcode commented Dec 31, 2020

I'm fine with either fix going in the next release to make it work for you guys. I think I prefer this one a touch as it doesn't change the public API.

@imalsogreg imalsogreg force-pushed the greg/close-the-portal branch from a2c8ab2 to f4bfd6e Compare December 31, 2020 13:07
@imalsogreg
Copy link
Author

@mehcode Thanks! I think we'll spend a couple more days seeing if we can find solutions that we like a little better. And then we'll check in with you and see what we all think is the right thing to merge.

@imalsogreg
Copy link
Author

NB that this patch doesn't work in our bigger codebase. Our testsuite throws

Error: InternalError(encountered unexpected or invalid data: expecting ParseComplete but received CommandComplete)

So we shouldn't merge this PR. In addition to the CI here reporting that it's broken, we see that it's broken in the wild too.
Will continue working on alternatively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transaction commit raises CockroachDB error
2 participants