Company
Date Published
Author
Marko Rajcevic
Word count
419
Language
English
Hacker News points
None

Summary

The best way to handle restart errors in YSQL is to use at least version 2.12 or 2.13 of YugabyteDB with yb_enable_read_committed_isolation=true, which enables the READ COMMITTED isolation level that supports pessimistic locking and reduces the occurrence of restart errors. This isolation level can alleviate all the errors you are running into, especially in cases where there is clock skew between nodes. If upgrading the cluster is not possible, incorporating retries at the application level can also help alleviate the issue.