[teiid-issues] [JBoss JIRA] (TEIID-2349) Cannot execute Two-Phase Commit using Multi-Source Model Dynamic VDB

RH Bugzilla Integration (JIRA) jira-events at lists.jboss.org
Wed Feb 6 13:11:51 EST 2013


    [ https://issues.jboss.org/browse/TEIID-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752624#comment-12752624 ] 

RH Bugzilla Integration commented on TEIID-2349:
------------------------------------------------

Filip Elias <felias at redhat.com> changed the Status of [bug 895304|https://bugzilla.redhat.com/show_bug.cgi?id=895304] from ON_QA to VERIFIED
                
> Cannot execute Two-Phase Commit using Multi-Source Model Dynamic VDB
> --------------------------------------------------------------------
>
>                 Key: TEIID-2349
>                 URL: https://issues.jboss.org/browse/TEIID-2349
>             Project: Teiid
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 7.7.1
>            Reporter: Van Halbert
>            Assignee: Steven Hawkins
>             Fix For: 8.1, 7.7.4
>
>
> Description of problem:
> 2nd connection to Multi-Source Model Dynamic VDB is not Two-Phase Commit.
> How reproducible:
> Always
> Steps to Reproduce:
> Execute a update query via Multi-Source Model Dynamic VDB.
> ex) 
> vdb - maseter-vdb.xml
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <vdb name="MASTER-VDB" version="1">
>   <description>A Dynamic VDB</description>
>   <property name="UseConnectorMetadata" value="true" />
>   <model visible="true" type="PHYSICAL" name="VDB1">
>     <property name="supports-multi-source-bindings" value="true" />
>     <source name="db02" translator-name="postgresql" connection-jndi-name="java:/PostgresXADS02" />
>     <source name="db01" translator-name="postgresql" connection-jndi-name="java:/PostgresXADS01" />
>   </model>
> </vdb>
>   
> Additional info:
> Set the multisourceUpdate flag as first query plan creating.
> org.teiid.dqp.internal.process.multisource.MultiSourcePlanToProcessConverter.java
> 90:  @Override
> 91:  public synchronized RelationalPlan convert(PlanNode planNode)
> 92:      throws QueryPlannerException, TeiidComponentException {
> 93:      RelationalPlan result = null;
> 94:    try {
> 95:      result = super.convert(planNode);
> 96:      return result;
> 97:    } finally {
> 98:      if (result != null && update && multiSource) {
> -> 99:        result.setMultisourceUpdate(true);
> 100:      }
> 101:      update = false;
> 102:      multiSource = false;
> 103:    }
> 104:  }
> If multisourceUpdate is true, transactionService is started by teiid engine. But, second connects does not set the multisourceUpdate flag. Therefore, teiid engine does not start transactionService. 
> org.teiid.dqp.internal.process.Request.java
> 338:  private void createProcessor() throws TeiidComponentException {
> --- snip ---
> 349:    if(RequestMessage.TXN_WRAP_ON.equals(requestMsg.getTxnAutoWrapMode())){ 
> 350:      startAutoWrapTxn = true;
> 351:    } else if (RequestMessage.TXN_WRAP_DETECT.equals(requestMsg.getTxnAutoWrapMode())){
> 352:      boolean transactionalRead = requestMsg.getTransactionIsolation() == Connection.TRANSACTION_REPEATABLE_READ
> 353:        || requestMsg.getTransactionIsolation() == Connection.TRANSACTION_SERIALIZABLE;
> -> 354:        startAutoWrapTxn = processPlan.requiresTransaction(transactionalRead);
> 355:    } 
> 356:
> 357:    if (startAutoWrapTxn) {
> 358:      try {
> -> 359:        transactionService.begin(tc);
> 360:      } catch (XATransactionException err) {
> 361:        throw new TeiidComponentException(err);
> 362:      }
> 363:    }
> 364:  }
> org.teiid.query.processor.relational.RelationalPlan.java
> 254:  @Override
> 255:  public boolean requiresTransaction(boolean transactionalReads) {
> 256:    if (multisourceUpdate) {
> -> 257:      return true;
> 258:    }
> 259:    if (this.with != null) {
> 260:      if (transactionalReads) {
> 261:        return true;
> 262:      }
> 263:      for (WithQueryCommand withCommand : this.with) {
> 264:        if (withCommand.getCommand().getProcessorPlan().requiresTransaction(transactionalReads)) {
> 265:          return true;
> 266:        }
> 267:      }
> 268:    }
> 279:    return requiresTransaction(transactionalReads, root);
> 270:  }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the teiid-issues mailing list