This project is mirrored from https://:*****@osm.etsi.org/gerrit/osm/RO.git. Pull mirroring updated .
  1. May 27, 2019
  2. May 23, 2019
  3. May 22, 2019
  4. May 14, 2019
  5. May 13, 2019
  6. May 10, 2019
  7. May 09, 2019
  8. May 06, 2019
  9. Apr 29, 2019
  10. Apr 26, 2019
  11. Apr 18, 2019
  12. Apr 15, 2019
  13. Apr 11, 2019
  14. Apr 09, 2019
  15. Apr 08, 2019
  16. Mar 29, 2019
  17. Mar 25, 2019
  18. Mar 21, 2019
  19. Mar 20, 2019
  20. Mar 14, 2019
  21. Mar 12, 2019
  22. Feb 19, 2019
  23. Feb 18, 2019
  24. Feb 10, 2019
    • bravalheria's avatar
      Improve race conditions/MySQL reconnection · dfed511c
      bravalheria authored
      
      
      This commit aims to provide a better synchronization between all the
      different threads in RO, specially regarding DB usage and internal state
      consistency.
      
      The following improvements were done:
      
      1. Centralize database retry logic into a single function
      
        This way we can change the procedure and the rules for retrying in a
        single place and this reflects in several functions simultaneously
        avoiding the need for manual copy and paste (and the potential risk of
        forgetting to change somewhere)
      
      2. Minor fixes/improvements related to database connection loss.
      
        Previously `db_base` was already able to identify when the connection
        to MySQL was lost, but apparently in a few edge cases the automatic
        reconnection was not done.
      
      3. Implement a transaction method
      
        This method replaces the old context manager API for the connection
        object that was removed from MySQLdb in version 1.4
      
        In additional it is possible to use a decorator for transactions
        (not only the context manager), which is handy sometimes.
      
      4. Add lock mechanism directly to db_base
      
        This helps to improve synchronization between threads.
        Some extra synchronization was introduced to functions, as it seemed
        to be the case.
        Moreover, previously, the cursor object was part of the internal state
        of the db_base object, and it was being changed/used without thread
        synchronization (error-prone). Having the locking mechanism around the
        changes in the cursor property of the class, avoids problems.
      
      5. Add option to fork connection
      
        Useful when independent threading is needed (as long as different
        threads don't access the same database table, having separated
        connections and locks should work fine).
      
      Change-Id: I3ab34df5e8c2857d96ed14a70e7f65bd0b5189a0
      Signed-off-by: default avatarAnderson Bravalheri <a.bravalheri@bristol.ac.uk>
      dfed511c
  25. Feb 07, 2019