Skip to content
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

[DON'T MERGE] tx+boom+ID specification -> panic!!! #30

Merged
merged 1 commit into from
Dec 6, 2017

Conversation

sinmetal
Copy link
Collaborator

@sinmetal sinmetal commented Dec 5, 2017

If tx is executed with boom and put is done with ID specified, panic will be generated.
I added UnitTest which can reproduce it.

2017/12/05 19:51:54 appengine: not running under devappserver2; using some default configuration
panic: PendingKey was not created by corresponding transaction [recovered]
	panic: PendingKey was not created by corresponding transaction

goroutine 861 [running]:
testing.tRunner.func1(0xc420236b60)
	/Users/sinmetal/bin/google-cloud-sdk/platform/google_appengine/goroot-1.8/src/testing/testing.go:622 +0x29d
panic(0x159a6a0, 0xc420405c60)
	/Users/sinmetal/bin/google-cloud-sdk/platform/google_appengine/goroot-1.8/src/runtime/panic.go:489 +0x2cf
go.mercari.io/datastore/vendor/cloud.google.com/go/datastore.(*Commit).Key(0x1a01b78, 0xc4201bccb0, 0xc4201bccb0)
	/Users/sinmetal/go/src/go.mercari.io/datastore/vendor/cloud.google.com/go/datastore/transaction.go:300 +0x89
go.mercari.io/datastore/clouddatastore.(*commitImpl).Key(0xc420406678, 0x19993c0, 0xc42022a1f0, 0x0, 0x0)
	/Users/sinmetal/go/src/go.mercari.io/datastore/clouddatastore/transaction.go:145 +0x50
go.mercari.io/datastore/boom.(*Transaction).Commit(0xc4201eeec0, 0x0, 0x0, 0x0, 0x0)
	/Users/sinmetal/go/src/go.mercari.io/datastore/boom/transaction.go:122 +0x11c
go.mercari.io/datastore/testsuite.Transaction_WithBoom(0xc420236b60, 0x19a57c0, 0xc4204269f0, 0x19aa540, 0xc4204269c0)
	/Users/sinmetal/go/src/go.mercari.io/datastore/testsuite/transaction.go:303 +0x29e
go.mercari.io/datastore/clouddatastore.TestCloudDatastoreTestSuite.func1(0xc420236b60)
	/Users/sinmetal/go/src/go.mercari.io/datastore/clouddatastore/testsuite_test.go:65 +0x17e
testing.tRunner(0xc420236b60, 0xc420507520)
	/Users/sinmetal/bin/google-cloud-sdk/platform/google_appengine/goroot-1.8/src/testing/testing.go:657 +0x96
created by testing.(*T).Run
	/Users/sinmetal/bin/google-cloud-sdk/platform/google_appengine/goroot-1.8/src/testing/testing.go:697 +0x2ca

@sinmetal sinmetal changed the title [NOT MERGE] tx+boom+ID specification -> panic!!! [DON'T MERGE] tx+boom+ID specification -> panic!!! Dec 5, 2017
@vvakame vvakame merged commit 67794fa into mercari:master Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants