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

Mobilizing "create-tables" in persistence.xml and removing unnecessary errors when table is re-created #4920

Closed
thaorell opened this issue Aug 3, 2018 · 1 comment

Comments

@thaorell
Copy link
Contributor

thaorell commented Aug 3, 2018

After our biweekly call last week, it has come to attention that during GlassFish deployment, Java Persistence API tries to create tables in Postgres and will still do so even if the tables exist. This has two consequences:

  1. If we redeploy the application, thousands of unnecessary warnings will be in the log
  2. Startup time will be longer even if it's the second time the installation is run.

A preferred solution could be removing the create-tables field in persistence.xml and setting up the tables prior to asadmin deploy dataverse.war. In OpenShift, upon scaling up the GlassFish application, the second instance deploys faster than the first instance by roughly 25 seconds (2 minutes 15 seconds vs 2 minutes 40).

(I'll call the 1st glassfish pod the parent and any pod after that children pod)
Performance could potentially be better (all children runs faster than the parent by more than 25 seconds) if they don't try to recreate tables that are already there.

@thaorell thaorell changed the title Mobilizing "create-tables" in persistence.xml and removing unnecessary errors when table is created Mobilizing "create-tables" in persistence.xml and removing unnecessary errors when table is re-created Aug 3, 2018
@pdurbin
Copy link
Member

pdurbin commented Oct 16, 2022

@pdurbin pdurbin closed this as completed Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants