-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nakama server cannot apply migrations with beta-20170420 #15269
Comments
It's hard for me to see what particular schema change in that file is failing within your golang code. I'd appreciate it if you can provide me with a pointer your golang code that is failing while applying the schema. This is the code that reads that schema file and calls into the sql driver. Thanks! |
Can you |
thanks @petermattis adding
to the initial_schema.sql file and running
I'm not seeing an issue here. Thanks |
@vivekmenezes We use this library to do migrations: https://github.com/rubenv/sql-migrate It depends on gorp (unfortunately) right now. The code we use to drive the migrations is within one of our subcommands of the server: https://github.com/heroiclabs/nakama/blob/master/cmd/migrate.go#L159 |
this issue is caused by the new code we put in to prevent statements from following a schema change in the same transaction when the schema change needs to be rolled out. I'm thinking about how we could fix this. One last minute option is to rollback #14368 |
@vivekmenezes it also seems that #14368 broke the examples-orms test suite: https://teamcity.cockroachdb.com/viewLog.html?tab=buildLog&buildTypeId=Cockroach_ExampleORMs&buildId=221487. |
I'm going to rollback my original change and another change that was made
in the fallout. Coming sometime in today
…On Thu, Apr 27, 2017, 5:23 PM Tamir Duberstein ***@***.***> wrote:
@vivekmenezes <https://github.com/vivekmenezes> it also seems that #14368
<#14368> broke the
examples-orms test suite:
https://teamcity.cockroachdb.com/viewLog.html?tab=buildLog&buildTypeId=Cockroach_ExampleORMs&buildId=221487
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15269 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALOpBMp7saznl1fu1wSS-ewwBZnW3idHks5r0QdqgaJpZM4NFHJb>
.
|
rolls back cockroachdb#15339 cockroachdb#14368 for the most part and cockroachdb#14619 partially. We used a very big hammer to prevent some statements from following a schema change. This was done to reduce surprises but it ended up introducing more surprises. ORMs and schema migration tools depend on multiple schema changes being staged in the same transaction. fixes cockroachdb#15269
I cannot run a migration with Nakama which worked with beta-20170330.
The start of the log file for cockroachdb:
The error output for Nakama server:
The important error message is "pq: there is already a transaction in progress handling 20170115200001_initial_schema.sql". I'm not sure what we'd need to change to apply our schema migrations with the latest version of cockroachdb. The SQL migration we try to apply is here:
https://github.com/heroiclabs/nakama/blob/master/migrations/20170115200001_initial_schema.sql
Let me know what more information I can supply to help identify root cause and how best to resolve it.
The text was updated successfully, but these errors were encountered: