1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/f11a729d42cb/ Changeset: f11a729d42cb User: martenson Date: 2014-01-03 22:01:54 Summary: fix for bug with hid starting at 2 instead of 1, introduced by myself at 2bb7df0 Affected #: 1 file diff -r 720ad6d7b18324740eaf8727e2ed41ee24c68b45 -r f11a729d42cb66753b8b1616ad625c1b2a306b3d lib/galaxy/model/mapping.py --- a/lib/galaxy/model/mapping.py +++ b/lib/galaxy/model/mapping.py @@ -1852,16 +1852,21 @@ def db_next_hid( self ): """ - Override __next_hid to generate from the database in a concurrency - safe way. + db_next_hid( self ) + + Override __next_hid to generate from the database in a concurrency safe way. + Loads the next history ID from the DB and returns it. + It also saves the future next_id into the DB. + + :rtype: int + :returns: the next history id """ conn = object_session( self ).connection() table = self.table trans = conn.begin() try: - current_hid = select( [table.c.hid_counter], table.c.id == self.id, for_update=True ).scalar() - next_hid = current_hid + 1 - table.update( table.c.id == self.id ).execute( hid_counter = ( next_hid ) ) + next_hid = select( [table.c.hid_counter], table.c.id == self.id, for_update=True ).scalar() + table.update( table.c.id == self.id ).execute( hid_counter = ( next_hid + 1 ) ) trans.commit() return next_hid except: Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.