cockroachdb / cockroachdb/movr

transaction retry error during init

Open
#82 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
37
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Trying to reload an existing database results in a retriable error. dropping the database manually doesnt help.

Need a pattern for dropping tables in SQLAlchemy. Currently we do
```
logging.info("initializing tables")
Base.metadata.drop_all(bind=self.engine)
Base.metadata.create_all(bind=self.engine)
logging.debug("tables dropped and created")
```

```[INFO] (MainThread) connected to movr database @ postgres://root@35.230.105.254:26257/movr?sslmode=disable
[INFO] (MainThread) initializing tables
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 761, in _commit_impl
self.engine.dialect.do_commit(self.connection)
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 505, in do_commit
dbapi_connection.commit()
psycopg2.errors.SerializationFailure: restart transaction: TransactionRetryWithProtoRefreshError: TransactionRetryError: retry txn (RETRY_SERIALIZABLE): "sql txn" id=dc48af95 key=/Table/SystemConfigSpan/Start rw=true pri=0.02292581 stat=PENDING epo=0 ts=1555378825.925710804,1 orig=1555378825.387530255,0 max=1555378825.505131171,0 wto=false seq=8```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.