[ 
https://issues.apache.org/jira/browse/METAMODEL-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15280123#comment-15280123
 ] 

Dennis Du Krøger commented on METAMODEL-142:
--------------------------------------------

Hmmm... The more I look at it, the less sense it makes. All changes should only 
affect creation, deletion and reading the schema, I don't really see anything 
that would slow down neither selecting or inserting.

Manual tests confirms it, though; Using test test database (135 columns, almost 
all nvarchar(max)):
commit 3b7c4fc execution times are around 45 seconds: 0m45.685s, 0m43.682s, 
0m49.847s
commit f9ba247 execution times are around 67 seconds: 1m6.786s 1m7.020s 1m4.880s

BTW, I should mention that it is on SQL Server (2014 in my case, not sure about 
[~h.drexler]'s).

> 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)

Reply via email to