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

spanner: expose commit stats #272

Open
danielnorberg opened this issue May 30, 2024 · 0 comments
Open

spanner: expose commit stats #272

danielnorberg opened this issue May 30, 2024 · 0 comments

Comments

@danielnorberg
Copy link

danielnorberg commented May 30, 2024

Thank you a lot for this library, we're using it to interact with cloud spanner from our rust backend.

In the course of adding instrumentation we realized that it would be useful to have the mutation counts from our spanner transactions. It seems possible to set CommitOptions::return_commit_stats = true and then the CommitResponse::commit_stats will be set, but ReadWriteTransaction::end and Client::read_write_transaction_with_option only returns the commit timestamp.

I'd be happy to contribute a change to expose the commit stats in the Client and/or ReadWriteTransaction APIs, but naively changing end or read_write_transaction_with_option to also return commit stats would seem to be a breaking change.

Do you have any thoughts on the best way to expose the commit stats? Would a breaking change be acceptable or should we introduce new functions to be backwards compatible, e.g. end_with_stats and read_write_transaction_with_stats?

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

No branches or pull requests

1 participant