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

Print mutation count in verbose mode #107

Merged

Conversation

apstndb
Copy link
Collaborator

@apstndb apstndb commented Feb 9, 2021

Cloud Spanner limit mutation count in a commit. It is hard to calculate and not well documented about complex situations.

google-cloud-go spanner/v1.14.0 support CommitStats which contains mutation count so spanner-cli can print it.

$ spanner-cli -v 
> INSERT tbl(pk) VALUES(1);
Query OK, 1 rows affected (0.95 sec)
timestamp:      2021-02-09T14:03:22.980381+09:00
mutation_count: 1

> BEGIN RW;
Query OK, 0 rows affected (0.04 sec)

(rw txn)> INSERT tbl(pk, col) VALUES(2, 0);
Query OK, 1 rows affected (0.53 sec)

(rw txn)> COMMIT;
Query OK, 0 rows affected (0.14 sec)
timestamp:      2021-02-09T14:03:58.550281+09:00
mutation_count: 2

@google-cla google-cla bot added the cla: yes CLA signed label Feb 9, 2021
@apstndb apstndb requested a review from yfuruyama February 9, 2021 05:11
@yfuruyama
Copy link
Collaborator

Thanks for contribution. LGTM!

@yfuruyama yfuruyama merged commit 53adbf8 into cloudspannerecosystem:master Feb 10, 2021
@apstndb apstndb deleted the feature/enable-commit-stats branch February 10, 2021 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes CLA signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants