Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2179

Transactions should sent in group not chunked

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Invalid
    • Affects Version/s: 2.2, 2.3, Git Master
    • Fix Version/s: None
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:
    • Environment:
      MySQL 5.5 / Percona

      Description

      In UnitOfWork::commit() it seems that a transaction is done like this:

      • will send separate queries for transaction start
      • compute the queries/send them to the db driver
      • execute the commit statement
      • optionally execute rollback

      The question would be, should my webserver have some issues with resources, wouldn't this part of the code be a pain for the DB?

      I don't know how mysql, for example, handles sending the transaction in chunks as opposed to sending it in 2/3 statements ( begin + ops and commit / + revert in case of failure) or in mySQL,l the transaction is evaluated on COMMIT statement only?

      If my assumption about how MySQL works, locking everything as soon as the statement is on the server, then shouldn't Doctrine use a internal buffer for sending transactions to the DB driver in order to avoid all sorts of problems that appear in high concurency scenarios?

      Best regards.

        Activity

        Florin Patan created issue -
        Florin Patan made changes -
        Field Original Value New Value
        Affects Version/s Git Master [ 10100 ]
        Affects Version/s 2.3 [ 10185 ]
        Marco Pivetta made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]
        Resolution Invalid [ 6 ]

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Florin Patan
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: