How to change transaction level for metadata (INFORMATION_SCHEMA) operations (Spanner DB)?


yunus@...
 

Hi everyone,

I am implementing an RDBMS adapter for the GCP Spanner DB. I encounter a problem with transactions and metadata operations.
Spanner DB supports information schema queries with read-only transactions, not with read-write.
So while performing an insert, or select operation, Datanucleus performs a getTable operation to get column info or at least check the existence of the table.
Then Spanner raises an exception that information schema operation is not supported with a read-write transaction.

I am kind of stuck on how to proceed.
The first solution that comes to my mind is usingĀ a second read-only connection to perform these metadata operations. But I don't know how viable or hard it is.
Do you have any suggestions?

I use Datanucleus 4.1. I have not tested with the latest version 5 yet.

thanks in advance
yunus

Join main@datanucleus.groups.io to automatically receive all group messages.