Git Product home page Git Product logo

Comments (2)

jamadden avatar jamadden commented on June 30, 2024

Those are all variations on (subclasses of) ZODB.POSException.ConflictError, itself a type of transaction.interfaces.TransientError. They indicate that ZODB's optimistic concurrency assumptions do not hold true: multiple transactions are trying to modify the same object, or objects that they depend upon. Thus, it is normal for applications that are writing concurrently to shared objects.

The only thing you can do about that (aside from either limiting your concurrency or designing your application not to write to shared objects) is to implement transaction retries. The higher the concurrency and the more objects are shared, the more transaction retries it will take. The transaction package has some limited support for that; other options include pyramid_tm, repoze.tm2, and nti.transactions. Last I looked, pyramid_tm and repoze.tm2 are specific to Pyramid and WSGI, respectively, while the mechanisms in transaction and nti.transactions can be used outside of those environments.

from relstorage.

tflorac avatar tflorac commented on June 30, 2024

Hi Jason,
I actually use the pyramid_tm package, and a default value of 3 retries in case of conflict error.
As the shared conflicting objects are probably part of the catalog, I just reduced client applications concurrency level... That's not a perfect solution but in my use case it's not a great problem, as documents integrity is the main point and it is a long but only one-shot process!
Best regards,
Thierry

from relstorage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.