gcpug / zagane

zagane is a static analysis tool which can find bugs in spanner's code
MIT License
89 stars 15 forks source link

Fix for BatchReadOnlyTransaction check #48

Closed sters closed 6 months ago

sters commented 2 years ago

I have a weird case of using BatchReadOnlyTransaction, please check f7 testcase.

I guess the reason is BatchReadOnlyTransaction.Close and ReadOnlyTransaction.Close are different. https://github.com/googleapis/google-cloud-go/blob/main/spanner/batch.go#L246-L251

So, I added BatchReadOnlyTransaction.Close to close method list. (I don't have confidence on my changes.)

sters commented 2 years ago

@tenntenn @sinmetal (I'm not sure the actual owner. I refered to the latest PR https://github.com/gcpug/zagane/pull/45)

Please review this PR.

sters commented 6 months ago

Let me close this PR. Feel free to pick my commit. 🙏