Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-38935

Harden transaction code

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.8.x
    • Fix Version/s: None
    • Component/s: Kernel
    • Labels:
    • Previous Issue Keys:
      KNL-799

      Description

      This is follow-up on KNL-433 that was reverted.

      Charles Hedrick mentioned in a comment

      "One other thing we might consider is hardening the transaction code. In BaseSqlService, look at transact. You'll see that it's a try with a number of catches and then a finally. The main code does a commit. The catches do rollback. There are catches for the most likely exceptions, but certainly not for every possible exception. I recommend getting them all. One approach would be to add a final catch on Exception. Another probably better approach is to add a boolean didCommit which you set right after the commit. Then in the finally, say

      if (connection != null && ! didCommit)
      rollback "

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  k1team KERNEL TEAM (Inactive)
                  Reporter:
                  ottenhoff Sam Ottenhoff
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration