-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[Bug]: Unable to Restart Google Spanner Change Streams Consumer due to tableExists(table_name) bug #32509
[Bug]: Unable to Restart Google Spanner Change Streams Consumer due to tableExists(table_name) bug #32509
Comments
Fix for issue apache#32509
cc @nielm |
cc: @thiagotnunes |
The fix may have to be more complicated than the suggested solution, as it is possible to have multiple schemas in a spanner database. I have handed this over to the team responsible for maintaining SpannerIO Change streams. |
Hi @nielm, Thanks for your quick response. I understand that may be the case. If they can come up with a quick solution that will factor that in then that would be great. However, if that will take a bit of time, could we please have this added as an intermediate solution. As the SDK is right now, it's not usable. This solution will allow people to use the SDK as we await for a permanent solution. If this is still not acceptable, can we please have something like this instead that will not throw an Exception on restart? CREATE TABLE IF NOT EXISTS metadata_table ... |
Are you using Postgres dialect by any chance? If so are you seeing table_schema set to public? |
Yes I'm using Postgres dialect. |
Right, added a comment to your PR |
Apologies, which comment are you refereeing to? I don't see a comment from your account on the PR. |
What happened?
The method used to check whether a table exists on spanner can in some scenarios always return
false
as there is no ability to specify thetable_catalog
andtable_schema
. In my case, these fields are always populated in theinformation_schema.tables
view.The first time I run the application, it runs fine as it creates the metadata table. The problem arrises when I restart the application & specify the same metadata table. It tries to recreate the table but it already exists resulting in a Spanner Exception.
Link to tableExists code
Link to Where it is used
This results in a scenario where a change stream consumer cannot recover from a restart.
Suggested solution
Issue Priority
Priority: 1 (data loss / total loss of function)
Issue Components
The text was updated successfully, but these errors were encountered: