Gwen Shapira created SQOOP-1385:
-----------------------------------

             Summary: Sqoop2: SQLException while creating connector will end up 
with inconsistent state
                 Key: SQOOP-1385
                 URL: https://issues.apache.org/jira/browse/SQOOP-1385
             Project: Sqoop
          Issue Type: Bug
          Components: sqoop2-server
    Affects Versions: 1.99.3
            Reporter: Gwen Shapira
            Assignee: Gwen Shapira


When creating connections (and probably other multi-step doWithConnection 
activities), there are multiple statements in the same transaction.

In createConnection we first create the connection and then insert inputs.
If one of the insert input fails, Derby will roll back that statement but not 
the entire transaction (this is correct SQL behavior and happens in most DBs). 

doWithConnection will commit the transaction once doIt exists without checking 
state (actually we don't even have a good way of letting doWithConnection know 
about transaction failures.

This leaves us with a connection that is created but missing inputs.

Right now the only way to reproduce is by dumping repository, fiddling with IDs 
and trying to load, but errors happen and we need to maintain transaction 
consistency by rolling back everything following a SQL error.
 




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to