SQLAlchemy, Serializable transactions isolation and retries in idiomatic Python way

后端 未结 2 1012
青春惊慌失措
青春惊慌失措 2021-02-16 00:00

PostgreSQL and SQL defines a Serializable transaction isolation level. If you isolate transactions to this level, conflicting concurrent transactions abort and need retrying.

2条回答
  •  佛祖请我去吃肉
    2021-02-16 00:11

    Postgres and Oracle conflict errors are marked as retryable by zope.sqlalchemy. Set your isolation level in the engine configuration and the transaction retry logic in pyramid_tm or Zope will work.

提交回复
热议问题