[
https://issues.apache.org/jira/browse/METAMODEL-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15280091#comment-15280091
]
Dennis Du Krøger commented on METAMODEL-142:
--------------------------------------------
I'm not sure why, but the fix for this issue causes slowdowns when doing a
table copy by . In some cases massive slowdowns ([~h.drexler] reported ~10 ->
~40 seconds for a 50 column table), in others more modest (I saw ~55 seconds ->
~67 seconds for a 135 column table).
In my case the table already existed, so it doesn't seem related at all, but a
git bisect identified the exact commit for this:
{noformat}
f9ba2470a2593bb24ac599c30f21b94622036548 is the first bad commit
commit f9ba2470a2593bb24ac599c30f21b94622036548
Author: Kasper Sørensen <[email protected]>
Date: Tue May 19 18:51:25 2015 +0200
METAMODEL-142: Fixed
{noformat}
Please note that the reproduction is through DataCleaner, but testing was done
by simply overwriting the MetaModel-JDBC JAR file with the one from each build
and then rerunning the job. This leaves a small chance that it is because of
some interaction between DC and the change.
Trying to look into the change to see if I can find the reason for the slowdown.
> Create JDBC table within an UpdateScript and with connection pool returns a
> null table
> --------------------------------------------------------------------------------------
>
> Key: METAMODEL-142
> URL: https://issues.apache.org/jira/browse/METAMODEL-142
> Project: Apache MetaModel
> Issue Type: Bug
> Reporter: Kasper Sørensen
> Assignee: Kasper Sørensen
>
> If you execute an update on a JdbcDataContext based on a connection pool in
> which BOTH creates a new table and starts inserting records to it, then it
> may fail.
> To be specific, a table returned by the TableCreationBuilder will return null:
> {code}
> final Table table = tableBuilder.execute();
> {code}
> Our JdbcMetadataLoader is loading tables from the schema like this:
> {code}
> @Override
> public void loadTables(JdbcSchema schema) {
> final Connection connection = _dataContext.getConnection();
> ...
> {code}
> But since a new connection will be used here, and the other connection is
> still in an active transaction, then the isolation criterium of the
> transaction will cause this to NOT include the newly created table in the
> metadata
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)