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

Handle CRDB Retry responses #76

Closed
ecordell opened this issue Sep 15, 2021 · 0 comments · Fixed by #75
Closed

Handle CRDB Retry responses #76

ecordell opened this issue Sep 15, 2021 · 0 comments · Fixed by #75
Assignees
Labels
area/datastore Affects the storage system priority/2 medium This needs to be done

Comments

@ecordell
Copy link
Contributor

ecordell commented Sep 15, 2021

See: cockroachlabs.com/docs/v21.1/transactions#client-side-intervention

Here's an example of spicedb logs when a retry isn't handled:

5:04PM ERR Exec args=[] err="ERROR: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE - failed preemptive refresh): \"sql txn\" meta={id=caf1be11 key=/Table/54/2/\"QRdiUVdMQmkyjQjX\"/\"user\"/\"...\"/\"resource\"/\"direct\"/\"thegoods\"/0 pri=0.04592771 epo=0 ts=1631394282.849166225,2 min=1631394148.811930011,0 seq=6} lock=true stat=PENDING rts=1631394148.811930011,0 wto=false gul=1631394149.311930011,0 (SQLSTATE 40001)" module=pgx sql=commit
5:04PM ERR finished server unary call error="unable to write tuples: ERROR: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE - failed preemptive refresh): \"sql txn\" meta={id=caf1be11 key=/Table/54/2/\"QRdiUVdMQmkyjQjX\"/\"user\"/\"...\"/\"resource\"/\"direct\"/\"thegoods\"/0 pri=0.04592771 epo=0 ts=1631394282.849166225,2 min=1631394148.811930011,0 seq=6} lock=true stat=PENDING rts=1631394148.811930011,0 wto=false gul=1631394149.311930011,0 (SQLSTATE 40001)" grpc.code=Unknown grpc.method=Write grpc.method_type=unary grpc.service=authzed.api.v0.ACLService grpc.start_time=2021-09-11T17:02:29-04:00 grpc.time_ms=3712.738 kind=server system=grpc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/datastore Affects the storage system priority/2 medium This needs to be done
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant