datastore.it.ITDatastoreTest: testTransactionWithRead and testTransactionWithQuery fail if the test DB type is Firestore in Datastore mode #497
Labels
api: datastore
Issues related to the googleapis/java-datastore API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
🚨
This issue needs some love.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
These tests always timeout when testing with a Firestore in Datastore Mode DB. I think the reason they pass in continuous tests is because the type of DB they use (in project
gcloud-devel
) is "Cloud Datastore".I believe the root cause of the timeouts is the transaction isolation and consistency behavior differences between the 2 Datastore DB types, documented here and here.
TL;DR
With Firestore in datastore mode when 2 concurrent transactions read or write the same data, the lock held by one transaction can delay the other transaction (hence the timeouts), but with Cloud Datastore the contention is reported as an error at commit.
Environment details
All environments
Steps to reproduce
Stack trace
it.ITDatastoreTest.testTransactionWithQuery
it.ITDatastoreTest.testTransactionWithRead
this test would also timeout if this code was updating ENTITY3 as stated in the comment.
External references such as API reference guides
The text was updated successfully, but these errors were encountered: