nodejs-spanner: TypeError: Cannot read property 'type' of undefined at SessionPool.getSessionGroup_
I have a cloud function deployed on GCP which is triggered by Cloud Pub/Sub topic. It connects to cloud spanner to insert the pub/sub event data. It is a high volume pub/sub topic and make simultaneous insert requests in different cloud spanner table. However, it keep giving below errors intermittently.
ERROR: TypeError: Cannot read property ‘type’ of undefined at SessionPool.getSessionGroup_ (/user_code/node_modules/@google-cloud/spanner/src/session-pool.js:709:17) at SessionPool.spliceSession_ (/user_code/node_modules/@google-cloud/spanner/src/session-pool.js:865:20) at SessionPool.borrowSession_ (/user_code/node_modules/@google-cloud/spanner/src/session-pool.js:419:8) at SessionPool.getNextAvailableSession_ (/user_code/node_modules/@google-cloud/spanner/src/session-pool.js:648:8) at /user_code/node_modules/@google-cloud/spanner/src/session-pool.js:936:19
Below are the dependencies in package.json
{
"dependencies": {
"safe-buffer": "5.1.1",
"@google-cloud/spanner": "1.3.0",
"google-gax": "^0.14.5"
}
}
Thanks for your help.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 23 (7 by maintainers)
@callmehiphop i test and it works!
@callmehiphop Thanks for your patience Dave. We are good to go with this fix as we have not seen this error occurring in our test environment.
@callmehiphop We have pushed this fix in our testing environment and will monitor the cloud functions for a few days as it is an intermittent issue. I’ll update you soon.