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

Bulk Import: Throws a transactional error #1542

Closed
cortneyh opened this issue Sep 19, 2023 · 1 comment
Closed

Bulk Import: Throws a transactional error #1542

cortneyh opened this issue Sep 19, 2023 · 1 comment
Labels
area/datastore Affects the storage system area/perf Affects performance or scalability kind/bug Something is broken or regressed

Comments

@cortneyh
Copy link

What platforms are affected?

linux

What architectures are affected?

others

Steps to Reproduce

Using the bulk import we are calling the endpoint with 10,000 relationships to write. For context, we have a total of 44 million relationships to write.

Expected Result

Ideally we would get a 200 success on the first time this API endpoint is called. With so many retries and failures, we are seeing major concerns with our performance.

Actual Result

Using the bulk import, the following error is returned.

Error writing relationship: {"message":"10max retries reached: retryable error: ERROR: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE - failed preemptive refresh): "sql txn" meta={id=77d76fb9 ... pri=0.01151762 epo=0 ts=1694563195.195766400,2 min=1694563193.108910486,0 seq=30001} lock=true stat=PENDING rts=1694563193.108910486,0 wto=false gul=1694563193.358910486,0 (SQLSTATE 40001)"}

@cortneyh cortneyh added the kind/bug Something is broken or regressed label Sep 19, 2023
@jzelinskie jzelinskie added hint/help wanted Someone else needs to handle this area/perf Affects performance or scalability area/datastore Affects the storage system and removed hint/help wanted Someone else needs to handle this labels Sep 23, 2023
@vroldanbet
Copy link
Contributor

Assuming you are using zed, the most recent release should handle these serialization errors transparently for you. If instead you are calling the API directly from your application, the recommendation is to retry on serialization errors just like zed does. SpiceDB should now return proper unavailable gRPC code that would allow your client to make the decision to retry.

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 area/perf Affects performance or scalability kind/bug Something is broken or regressed
Projects
None yet
Development

No branches or pull requests

3 participants