golang / oscar

[mirror] Open source contributor agent architecture repo.
BSD 3-Clause "New" or "Revised" License
148 stars 19 forks source link

DB transaction failure causes storage.Panic #49

Closed hyangah closed 1 day ago

hyangah commented 4 weeks ago

Error details:

firestore transaction" err="rpc error: code = Aborted desc = Aborted due to cross-transaction contention. This occurs when multiple transactions attempt to access the same data, requiring Firestore to abort at least one in order to enforce serializability.

at golang.org/x/oscar/internal/storage.Panic ( /src/internal/storage/db.go:156 )
at golang.org/x/oscar/internal/gcp/firestore.(*fstore).Panic ( /src/internal/gcp/firestore/firestore.go:86 )
at golang.org/x/oscar/internal/gcp/firestore.(*fstore).runTransaction ( /src/internal/gcp/firestore/firestore.go:170 )
at golang.org/x/oscar/internal/gcp/firestore.(*DB).lockTx ( /src/internal/gcp/firestore/db.go:147 )
at golang.org/x/oscar/internal/gcp/firestore.(*DB).lock ( /src/internal/gcp/firestore/db.go:127 )
at golang.org/x/oscar/internal/gcp/firestore.(*DB).waitForLock ( /src/internal/gcp/firestore/db.go:99 )
at golang.org/x/oscar/internal/gcp/firestore.(*DB).Lock ( /src/internal/gcp/firestore/db.go:77 )
at main.(*Gaby).serveHTTP.func4 ( /src/internal/gaby/main.go:322 )
hyangah commented 1 day ago

This is working as intended. If this happens a lot, we can increase the # of retries.