Derby
  1. Derby
  2. DERBY-5152

Shutting down db, information that the thread received an interrupt will not be restored to thread's interrupt flag

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.8.1.2
    • Fix Version/s: 10.8.1.2
    • Component/s: None
    • Labels:
      None

      Description

      When a thread receives an interrupt Derby detects this, it will reset the thread's flag and save the fact in its lcc (LanguageConnectionContext), if available. If not (e.g. during boot) it will save the information in a thread local variable. For performance reasons, we use the lcc when available. However, when shutting down the database, the lcc goers away, and when the JDBC call returns to the application, the thread's interrupt flag will not be reinstated as per our specification. This is because the lcc dies before we do the restoring (under shutdown). So, the information that the thread was interrupted is lost with the lcc going away. A possible solution is to move the flag over to the thread local variable when the lcc is popped, so that the restore code will find it.

      1. derby-5152-b.stat
        0.3 kB
        Dag H. Wanvik
      2. derby-5152-b.diff
        4 kB
        Dag H. Wanvik
      3. derby-5152.stat
        0.3 kB
        Dag H. Wanvik
      4. derby-5152.diff
        4 kB
        Dag H. Wanvik

        Issue Links

          Activity

          Hide
          Dag H. Wanvik added a comment -

          Committed the patch at svn 1086443, closing.

          Show
          Dag H. Wanvik added a comment - Committed the patch at svn 1086443, closing.
          Hide
          Dag H. Wanvik added a comment -

          Uploading a revised patch, "-b" which, relative to the first patch, contains a simplified test fixture
          Regressions passed.

          Show
          Dag H. Wanvik added a comment - Uploading a revised patch, "-b" which, relative to the first patch, contains a simplified test fixture Regressions passed.
          Hide
          Dag H. Wanvik added a comment -

          Preliminary patch for this issue. Copies the information from lcc over to the thread local variable when lcc is popped.

          Added a new test case to InterruptResilienceTest.

          Running regressions.

          Show
          Dag H. Wanvik added a comment - Preliminary patch for this issue. Copies the information from lcc over to the thread local variable when lcc is popped. Added a new test case to InterruptResilienceTest. Running regressions.

            People

            • Assignee:
              Dag H. Wanvik
              Reporter:
              Dag H. Wanvik
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development