Skip to content
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

ConcurrentModificationExecption when updating multiple schema's in parallel #1402

Closed
robinvandenbogaard opened this issue Sep 15, 2020 · 3 comments · Fixed by #1403
Closed

Comments

@robinvandenbogaard
Copy link

robinvandenbogaard commented Sep 15, 2020

Environment

Wildfly 20.0.1

Liquibase Version: 4.0.0

Liquibase Integration & Version: <Pick one: CLI, maven, gradle, spring boot, servlet, etc.>
maven

Liquibase Extension(s) & Version:
hibernate

Database Vendor & Version:
postgres

Operating System Type & Version:
various

Description

We're updating multiple schema's in parallel as soon as two threads attempt to start updating their respective schema. A ConcurrentModificationExecption occurs.

! java.util.ConcurrentModificationException: null
! at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134)
! at liquibase.executor.ExecutorService.getExecutor(ExecutorService.java:93)
! at liquibase.database.AbstractJdbcDatabase.getConnectionSchemaName(AbstractJdbcDatabase.java:359)
! at liquibase.database.AbstractJdbcDatabase.getDefaultSchemaName(AbstractJdbcDatabase.java:324)
! at liquibase.changelog.ChangeLogParameters.<init>(ChangeLogParameters.java:61)
! at liquibase.Liquibase.<init>(Liquibase.java:109)

Additional Context

Same problem reported on the forums:
https://forum.liquibase.org/t/liuibase-executor-executorservice-is-not-threadsafe/4472

@molivasdat
Copy link
Contributor

Thanks @robinvandenbogaard for submitting this issue and the PR to fix it. We will add it to our queue of issues to review.

@kevin-atx kevin-atx added hacktoberfest a month-long celebration of open-source software and Developers contribute by completing PRs and removed hacktoberfest a month-long celebration of open-source software and Developers contribute by completing PRs labels Sep 28, 2020
@zhoujia1974
Copy link

@robinvandenbogaard I'm the one report the same bug in the forum. Thank you for helping to fix the bug. Could you please help to submit a PR against 3.10.x branch?

@robinvandenbogaard
Copy link
Author

@zhoujia1974 someone else made a 3.10 PR here: #1456

This was referenced Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants