Search code examples
google-cloud-spanner

Spanner enable optimistic locking


How can I enable optimistic locking for Spanner? Spanner released that feature in 1.44 when we can set optimistic locking for transaction.

Spanner released that feature in 1.44 when we can set optimistic locking for transaction. I add ReadLockMode: spannerpb.TransactionOptions_ReadWrite_OPTIMISTIC in my transaction but when executed, it said Optimistic Locking is not enable?

I think the query past in Spanner emulator but not actual instance

Is there a feature request and settings I should set up for my project?

Thanks,


Solution

  • dang-dam-quang, feature is not yet GA'ed and hence it was not mentioned in the release notes too https://github.com/googleapis/google-cloud-go/releases/tag/spanner%2Fv1.44.0, we will communicate this in future releases when the feature will be GAed Thanks