-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
datastore: Parallel Transaction on same kind with unique keys giving concurrent transaction error #10068
Labels
Comments
product-auto-label
bot
added
the
api: datastore
Issues related to the Datastore API.
label
Apr 30, 2024
mehulparmariitr
changed the title
datastore: Parallel Transaction on same kind with different keys giving concurrent transaction error
datastore: Parallel Transaction on same kind with unique keys giving concurrent transaction error
Apr 30, 2024
On which version of Datastore client library are you facing this issue? |
@bhshkh I see its 1.0.0. But we have replaced also this lib in go.mod
|
Even with the latest version the error is there. Seems like a logical error. But if keys are unique then it shouldnt throw concurrent transaction error right?
The error -
|
This is the method I am using to upsert into DB -
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Client
datastore
Environment
Go executable on Linux
Go Environment
$ go version - go version go1.21.0 darwin/amd64
$ go env -
GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/mehparmar/Library/Caches/go-build'
GOENV='/Users/mehparmar/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/mehparmar/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/mehparmar/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.21.0'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/mehparmar/Repos/mehparmar/abcserv/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/6n/kcp2mfmx0s9_lqw9y30yqq500000gq/T/go-build1900003096=/tmp/go-build -gno-record-gcc-switches -fno-common'
Code
e.g.
Expected behavior
All entities should be written. There are around 275,000
Actual behavior
2024/04/30 05:06:42 Error during Upsert: datastore: concurrent transaction
UUID-NOT-COLLECTED API-NOT-COLLECTED class.Upsert tx.Commit: datastore: concurrent transaction
2024/04/30 05:06:43 Error during Upsert: datastore: concurrent transaction
UUID-NOT-COLLECTED API-NOT-COLLECTED class.Upsert tx.Commit: rpc error: code = InvalidArgument desc = Invalid transaction.
2024/04/30 05:06:43 Error during Upsert: rpc error: code = InvalidArgument desc = Invalid transaction.
UUID-NOT-COLLECTED API-NOT-COLLECTED class.Upsert tx.Commit: rpc error: code = InvalidArgument desc = Invalid transaction.
2024/04/30 05:06:43 Error during Upsert: rpc error: code = InvalidArgument desc = Invalid transaction.
Additional context
if keys are unique then why transaction is failing?
The text was updated successfully, but these errors were encountered: