-
-
Save gpaul/14fa2967c42d4ccf6b223322a7967476 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python repro2.py | |
DEBUG:sqlalchemy.pool.QueuePool:Created new connection <connection object at 0x7effde0a6048; dsn: 'host=127.0.0.1 user=root port=26257', closed: 0> | |
INFO:sqlalchemy.engine.base.Engine:SELECT CAST('test plain returns' AS VARCHAR(60)) AS anon_1 | |
INFO:sqlalchemy.engine.base.Engine:{} | |
INFO:sqlalchemy.engine.base.Engine:SELECT CAST('test unicode returns' AS VARCHAR(60)) AS anon_1 | |
INFO:sqlalchemy.engine.base.Engine:{} | |
DEBUG:sqlalchemy.pool.QueuePool:Connection <connection object at 0x7effde0a6048; dsn: 'host=127.0.0.1 user=root port=26257', closed: 0> checked out from pool | |
INFO:sqlalchemy.engine.base.Engine:CREATE DATABASE test8 | |
INFO:sqlalchemy.engine.base.Engine:{} | |
INFO:sqlalchemy.engine.base.Engine:COMMIT | |
DEBUG:sqlalchemy.pool.QueuePool:Connection <connection object at 0x7effde0a6048; dsn: 'host=127.0.0.1 user=root port=26257', closed: 0> being returned to pool | |
DEBUG:sqlalchemy.pool.QueuePool:Connection <connection object at 0x7effde0a6048; dsn: 'host=127.0.0.1 user=root port=26257', closed: 0> rollback-on-return | |
INFO:sqlalchemy.orm.mapper.Mapper:(ConfigItem|configs) _configure_property(id, Column) | |
INFO:sqlalchemy.orm.mapper.Mapper:(ConfigItem|configs) _configure_property(key, Column) | |
INFO:sqlalchemy.orm.mapper.Mapper:(ConfigItem|configs) _configure_property(value, Column) | |
INFO:sqlalchemy.orm.mapper.Mapper:(ConfigItem|configs) Identified primary key columns: ColumnSet([Column('id', Integer(), table=<configs>, primary_key=True, nullable=False)]) | |
INFO:sqlalchemy.orm.mapper.Mapper:(ConfigItem|configs) constructed | |
DEBUG:sqlalchemy.pool.QueuePool:Created new connection <connection object at 0x7effde0a6178; dsn: 'host=127.0.0.1 user=root dbname=test8 port=26257', closed: 0> | |
INFO:sqlalchemy.engine.base.Engine:SELECT CAST('test plain returns' AS VARCHAR(60)) AS anon_1 | |
INFO:sqlalchemy.engine.base.Engine:{} | |
INFO:sqlalchemy.engine.base.Engine:SELECT CAST('test unicode returns' AS VARCHAR(60)) AS anon_1 | |
INFO:sqlalchemy.engine.base.Engine:{} | |
DEBUG:sqlalchemy.pool.QueuePool:Connection <connection object at 0x7effde0a6178; dsn: 'host=127.0.0.1 user=root dbname=test8 port=26257', closed: 0> checked out from pool | |
INFO:sqlalchemy.engine.base.Engine:SHOW TABLES | |
INFO:sqlalchemy.engine.base.Engine:{} | |
DEBUG:sqlalchemy.engine.base.Engine:Col ('Table',) | |
INFO:sqlalchemy.engine.base.Engine: | |
CREATE TABLE configs ( | |
id INTEGER DEFAULT unique_rowid() NOT NULL, | |
key VARCHAR, | |
value VARCHAR, | |
PRIMARY KEY (id), | |
UNIQUE (key) | |
) | |
INFO:sqlalchemy.engine.base.Engine:{} | |
INFO:sqlalchemy.engine.base.Engine:COMMIT | |
DEBUG:sqlalchemy.pool.QueuePool:Connection <connection object at 0x7effde0a6178; dsn: 'host=127.0.0.1 user=root dbname=test8 port=26257', closed: 0> being returned to pool | |
DEBUG:sqlalchemy.pool.QueuePool:Connection <connection object at 0x7effde0a6178; dsn: 'host=127.0.0.1 user=root dbname=test8 port=26257', closed: 0> rollback-on-return | |
DEBUG:sqlalchemy.pool.QueuePool:Connection <connection object at 0x7effde0a6178; dsn: 'host=127.0.0.1 user=root dbname=test8 port=26257', closed: 0> checked out from pool | |
INFO:sqlalchemy.engine.base.Engine:BEGIN (implicit) | |
INFO:sqlalchemy.engine.base.Engine:SAVEPOINT cockroach_restart | |
INFO:sqlalchemy.engine.base.Engine:{} | |
INFO:sqlalchemy.orm.mapper.Mapper:(ConfigItem|configs) _post_configure_properties() started | |
INFO:sqlalchemy.orm.mapper.Mapper:(ConfigItem|configs) initialize prop id | |
INFO:sqlalchemy.orm.mapper.Mapper:(ConfigItem|configs) initialize prop key | |
INFO:sqlalchemy.orm.mapper.Mapper:(ConfigItem|configs) initialize prop value | |
INFO:sqlalchemy.orm.mapper.Mapper:(ConfigItem|configs) _post_configure_properties() complete | |
INFO:sqlalchemy.engine.base.Engine:INSERT INTO configs (key, value) VALUES (%(key)s, %(value)s) RETURNING configs.id | |
INFO:sqlalchemy.engine.base.Engine:{'key': 'some-key', 'value': 'some-value'} | |
DEBUG:sqlalchemy.engine.base.Engine:Col ('id',) | |
DEBUG:sqlalchemy.engine.base.Engine:Row (248997232740073473,) | |
INFO:sqlalchemy.engine.base.Engine:RELEASE SAVEPOINT sa_savepoint_1 | |
INFO:sqlalchemy.engine.base.Engine:{} | |
INFO:sqlalchemy.engine.base.Engine:ROLLBACK TO SAVEPOINT cockroach_restart | |
INFO:sqlalchemy.engine.base.Engine:{} | |
INFO:sqlalchemy.engine.base.Engine:ROLLBACK | |
DEBUG:sqlalchemy.pool.QueuePool:Connection <connection object at 0x7effde0a6178; dsn: 'host=127.0.0.1 user=root dbname=test8 port=26257', closed: 0> being returned to pool | |
DEBUG:sqlalchemy.pool.QueuePool:Connection <connection object at 0x7effde0a6178; dsn: 'host=127.0.0.1 user=root dbname=test8 port=26257', closed: 0> rollback-on-return, via agent | |
Traceback (most recent call last): | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
psycopg2.InternalError: SAVEPOINT not supported except for COCKROACH_RESTART | |
The above exception was the direct cause of the following exception: | |
Traceback (most recent call last): | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/cockroachdb/sqlalchemy/transaction.py", line 75, in _txn_retry_loop | |
ret = callback(conn) | |
File "repro2.py", line 37, in callback | |
conn.commit() | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 874, in commit | |
self.transaction.commit() | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 465, in commit | |
t[1].commit() | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1632, in commit | |
self._do_commit() | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1688, in _do_commit | |
self._savepoint, self._parent) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 760, in _release_savepoint_impl | |
self.engine.dialect.do_release_savepoint(self, name) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/cockroachdb/sqlalchemy/dialect.py", line 164, in do_release_savepoint | |
super(CockroachDBDialect, self).do_release_savepoint(connection, name) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 464, in do_release_savepoint | |
connection.execute(expression.ReleaseSavepointClause(name)) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 945, in execute | |
return meth(self, multiparams, params) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection | |
return connection._execute_clauseelement(self, multiparams, params) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement | |
compiled_sql, distilled_params | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 186, in reraise | |
raise value.with_traceback(tb) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
sqlalchemy.exc.InternalError: (psycopg2.InternalError) SAVEPOINT not supported except for COCKROACH_RESTART | |
[SQL: 'RELEASE SAVEPOINT sa_savepoint_1'] | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
psycopg2.InternalError: SAVEPOINT COCKROACH_RESTART has not been used or a non-retriable error was encountered: current transaction is aborted, commands ignored until end of transaction block | |
The above exception was the direct cause of the following exception: | |
Traceback (most recent call last): | |
File "repro2.py", line 39, in <module> | |
run_transaction(_session_factory, callback) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/cockroachdb/sqlalchemy/transaction.py", line 31, in run_transaction | |
return _txn_retry_loop(session, callback) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/cockroachdb/sqlalchemy/transaction.py", line 76, in _txn_retry_loop | |
return ret | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/cockroachdb/sqlalchemy/transaction.py", line 60, in __exit__ | |
self.txn.__exit__(typ, value, tb) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 569, in __exit__ | |
self.rollback() | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 518, in rollback | |
util.reraise(*rollback_err) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 187, in reraise | |
raise value | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 490, in rollback | |
transaction._rollback_impl() | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 527, in _rollback_impl | |
t[1].rollback() | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1621, in rollback | |
self._do_rollback() | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1683, in _do_rollback | |
self._savepoint, self._parent) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 750, in _rollback_to_savepoint_impl | |
self.engine.dialect.do_rollback_to_savepoint(self, name) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/cockroachdb/sqlalchemy/dialect.py", line 156, in do_rollback_to_savepoint | |
connection.execute('ROLLBACK TO SAVEPOINT cockroach_restart') | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 939, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text | |
statement, parameters | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 186, in reraise | |
raise value.with_traceback(tb) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/home/gustav/.pyenv/versions/bouncer/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
sqlalchemy.exc.InternalError: (psycopg2.InternalError) SAVEPOINT COCKROACH_RESTART has not been used or a non-retriable error was encountered: current transaction is aborted, commands ignored until end of transaction block | |
[SQL: 'ROLLBACK TO SAVEPOINT cockroach_restart'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment