•  
      request #13013 Internal Tuleap API should not expose multiple ways to work with DB transactions
    Infos
    #13013
    Thomas Gerbet (tgerbet)
    2019-02-28 10:59
    2019-02-20 16:58
    13191
    Details
    Internal Tuleap API should not expose multiple ways to work with DB transactions
    There is currently multiple ways to do same things.

    To start a transaction wrapping multiple things outside of a \Tuleap\DB\DataAccessObject instance you can:
    * use a \Tuleap\DB\DataAccessObject instance and call \Tuleap\DB\DataAccessObject->wrapAtomicOperations()
    * use a \Tuleap\DB\TransactionExecutor instance

    To start a transaction form within a \Tuleap\DB\DataAccessObject instance you also have multiple choices:
    * call \Tuleap\DB\DataAccessObject->wrapAtomicOperations()
    * call \Tuleap\DB\DataAccessObject->getDB()->tryFlatTransaction()


    There is no good reason to expose multiple ways to do the same things, it is not sane and can be confusing for contributors. The API must be cleaned.
    internal improvement
    Other
    Empty
    Empty
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2019-02-28
    Attachments
    Empty
    References

    List of items referenced by or referencing this item.

    Artifact Tracker v5

    Follow-ups

    • User avatar
      Integrated into Tuleap 10.11.99.4

      • Status changed from Under review to Closed
      • Connected artifacts
      • Close date set to 2019-02-28
    • User avatar
      Patch is under review: gerrit #14113.

      • Summary
        -Internal Tuleap API should not expose multiple ways to do work with DB transactions 
        +Internal Tuleap API should not expose multiple ways to work with DB transactions 
      • Status changed from Under implementation to Under review