bamaer commented on PR #9106:
URL: https://github.com/apache/hop/pull/9106#issuecomment-6540332029

   Thanks @hansva, the savepoint per row works as described for normal runs.
   
   **Blocker**
   
   - **Transactional pipelines now fail.** With a transactional run 
configuration, all transforms share one connection. Each transform now sets and 
releases its own savepoint on it. In PostgreSQL, `RELEASE SAVEPOINT` also drops 
every savepoint set after it, so two of these transforms with error hops delete 
each other's savepoints.
     Repro: Generate rows (20,000) → Update A → Update B, error hops on both, 
every row valid, transactional run configuration.
     - On main, all 20,000 rows are updated in both tables.
     - With this PR, the pipeline fails after about 10 rows with `ERROR: 
savepoint "jdbc_savepoint_6" does not exist`, and no rows are written. This 
happened in 4 out of 4 runs.
   
     Suggested fix: skip savepoints when the connection is shared. Add this to 
the `useSavepoints` condition in all five transforms:
     ```java
     && Utils.isEmpty(data.db.getConnectionGroup())
     ```
     With that line in `Update.init()`, the transactional run updates all 
20,000 rows and `UpdatePostgresIT` still passes.
   
   **What was run**
   - Built the five plugins from the PR head. Spotless and checkstyle are 
clean, and all the `*PostgresIT` tests pass (12 tests).
   - `UpdatePostgresIT` fails without the fix (`expected: <4> but was: <2>`).
   - `main-0048-error-hop-savepoints.hwf` passes on a 2.21.0-SNAPSHOT client 
with the five PR jars swapped in.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to