Open seglo opened 5 months ago
@seglo I've done a super naive (but working) implementation in this commit in our fork.
Feel free to use that and build your own version, or if you're comfortable with using binaries built by 3rd party, you can use the emulator version which we built for this release
@kberezin-nshl for some reason, running the emulator with your container fails with the following error:
runtime/cgo: pthread_create failed: Operation not permitted
SIGABRT: abort
PC=0x7f5a498e1e2c m=0 sigcode=18446744073709551610
goroutine 0 [idle]:
runtime: g 0: unknown pc 0x7f5a498e1e2c
stack: frame={sp:0x7ffd4419f860, fp:0x0} stack=[0x7ffd439a0cf0,0x7ffd4419fd00)
@bshaffer seems related to this issue.
It runs fine for me under Mac OS X and also under linux in our CI environment.
I was testing using the preview batch write API and noticed an improved throughput when working with a Cloud Spanner instance. However, when running the same code against the emulator as part of a larger integration test the emulator returns a NOT IMPLEMENTED gRPC error. I understand the emulator is a very limited tool to use, but I was expecting it to at least be able to accept the batch write request without an error.
My only option is to execute different persistence code for emulated vs cloud spanner environments which defeats the purpose of the integration test IMO.
Latest versions at the time of this post: Emulator version:
gcr.io/cloud-spanner-emulator/emulator:1.5.17
Google Cloud Spanner Java library"com.google.cloud" % "google-cloud-spanner-jdbc" % "6.68.1"
Sensitive package names censored.