genghisken / psat-server

Core python3 and C++ code for ATLAS and Pan-STARRS science servers
MIT License
1 stars 0 forks source link

Migration - sherlock tables are not migrated #5

Open genghisken opened 1 year ago

genghisken commented 1 year ago

The sherlock_crossmatches and sherlock_classifications tables are NOT migrated to the new database as part of the migration process. In the database these tables are InnoDB whereas all the others are MyISAM. Even though autocommit is switched ON, it appears that the transactions didn't "take". This is very worrying and needs to be investigated.

At best the autocommit function is not clearly switched on on the database. At worst, I will need to go through ALL my code and make sure that there is a commit statement after every transaction.

genghisken commented 1 year ago

For each connection set:

conn.autocommit(True)

This fixes the commit issue. NOTE that all code that uses MySQLdb (python 2 and python 3) will need to be retrofitted with this statement. (Good time to finish the code conversions to python 3!)