You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have manually called commit() before yield, but I still get the TransactionError: You need to manually commit() changes before suspending the generator error.
From the DEBUG SQL logs, it seems like the transaction is being directly rolled back.
2024-10-18 12:03:47.282 | INFO | core.task:confirm:64 - search fields: database=caijing_bytepay_sign_db
GET NEW CONNECTION
SELECT COUNT(*)
FROM `rdsfield``f`
WHERE `f`.`data_type` IN (%s, %s, %s, %s, %s, %s)
AND `f`.`db_name` = %s
['varchar', 'mediumtext', 'text', 'char', 'longtext', 'json', 'caijing_bytepay_sign_db']
COMMIT
SELECT `f`.`id`, `f`.`hash`, `f`.`name`, `f`.`region`, `f`.`db_name`, `f`.`table_name`, `f`.`data_type`, `f`.`comment`, `f`.`is_pk`, `f`.`is_sharding_key`, `f`.`create_time`, `f`.`latest_time`
FROM `rdsfield``f`
WHERE `f`.`data_type` IN (%s, %s, %s, %s, %s, %s)
AND `f`.`db_name` = %s
['varchar', 'mediumtext', 'text', 'char', 'longtext', 'json', 'caijing_bytepay_sign_db']
2024-10-18 12:03:47.317 | INFO | core.task:confirm:75 - find 16 fields to scan
ROLLBACK
RELEASE CONNECTION
Traceback (most recent call last):
File "/Users/bytedance/Projects/code/team/DBScan/demo.py", line 46, in<module>foriin task.confirm('caijing_bytepay_sign_db'):
File "/Users/bytedance/.local/share/virtualenvs/DBScan-X_8vXymQ/lib/python3.9/site-packages/pony/orm/core.py", line 601, in new_gen_func
output = wrapped_interact(iterator)
File "/Users/bytedance/.local/share/virtualenvs/DBScan-X_8vXymQ/lib/python3.9/site-packages/pony/orm/core.py", line 587, in wrapped_interact
rollback_and_reraise(sys.exc_info())
File "/Users/bytedance/.local/share/virtualenvs/DBScan-X_8vXymQ/lib/python3.9/site-packages/pony/orm/core.py", line 361, in rollback_and_reraise
reraise(*exc_info)
File "/Users/bytedance/.local/share/virtualenvs/DBScan-X_8vXymQ/lib/python3.9/site-packages/pony/utils/utils.py", line 88, in reraise
try: raise exc.with_traceback(tb)
File "/Users/bytedance/.local/share/virtualenvs/DBScan-X_8vXymQ/lib/python3.9/site-packages/pony/orm/core.py", line 584, in wrapped_interact
if cache.modified or cache.in_transaction: throw(TransactionError,
File "/Users/bytedance/.local/share/virtualenvs/DBScan-X_8vXymQ/lib/python3.9/site-packages/pony/utils/utils.py", line 99, in throw
raise exc
pony.orm.core.TransactionError: You need to manually commit() changes before suspending the generator
Process finished with exit code 1
pony ==0.7.19
python == 3.9
The text was updated successfully, but these errors were encountered:
I have manually called commit() before yield, but I still get the TransactionError: You need to manually commit() changes before suspending the generator error.
From the DEBUG SQL logs, it seems like the transaction is being directly rolled back.
The text was updated successfully, but these errors were encountered: