Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-3121

InternalVersionManagerBase.getVersionHistoryOfNode should throw InconsistentVersioningState when it encounters a runtime exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: jackrabbit-core, versioning
    • Labels:
      None

      Description

      When the versioning persistence is inconsistent (such as broken hierarchy in intermediary nodes), various calls in getVersionHistoryOfNode might fail with runtime exceptions.

      Catch those and report InconsistentVersioningState instead, supplying the node id of the version history; this will enable the versioning fixup to move away the version history (see JCR-3115).

      1. JCR-3121.patch
        1 kB
        Julian Reschke

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        9s 1 Julian Reschke 19/Oct/11 15:04
        In Progress In Progress Open Open
        12d 2h 4m 1 Julian Reschke 31/Oct/11 16:09
        Open Open Resolved Resolved
        39s 1 Julian Reschke 31/Oct/11 16:09
        Resolved Resolved Closed Closed
        85d 20h 58m 1 Jukka Zitting 25/Jan/12 13:08
        Jukka Zitting made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jukka Zitting made changes -
        Fix Version/s 2.2.10 [ 12318249 ]
        Julian Reschke made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        Hide
        Julian Reschke added a comment -

        Not needed anymore due to changes done with respect to JCR-3115.

        Show
        Julian Reschke added a comment - Not needed anymore due to changes done with respect to JCR-3115 .
        Julian Reschke made changes -
        Status In Progress [ 3 ] Open [ 1 ]
        Hide
        Julian Reschke added a comment -

        Rather than doing this we have instead changed the checker code to obtain the version history node ID as early as possible, which means that there are less cases we need to piggy-back the node ID to the exception (see JCR-3115).

        Show
        Julian Reschke added a comment - Rather than doing this we have instead changed the checker code to obtain the version history node ID as early as possible, which means that there are less cases we need to piggy-back the node ID to the exception (see JCR-3115 ).
        Jukka Zitting made changes -
        Fix Version/s 2.3.2 [ 12318547 ]
        Hide
        Julian Reschke added a comment -

        Revised plan: modify VersionManager so that we can get the history node id upfront; this will enable the versioning fixup to do the "right" thing without having too touch even more pieces of code.

        Show
        Julian Reschke added a comment - Revised plan: modify VersionManager so that we can get the history node id upfront; this will enable the versioning fixup to do the "right" thing without having too touch even more pieces of code.
        Julian Reschke made changes -
        Summary InternalVersionManagerBase.getVersionHistoryOfNode should throws InconsistentVersioningState when it encounters a runtime exception InternalVersionManagerBase.getVersionHistoryOfNode should throw InconsistentVersioningState when it encounters a runtime exception
        Julian Reschke made changes -
        Attachment JCR-3121.patch [ 12499687 ]
        Hide
        Julian Reschke added a comment -

        Proposed patch.

        Catching runtime exceptions is a bit unorthodox, but it avoids adding lots of null checks deeper in the call stacks. Recall that these checks aren't strictly needed unless the persistence is inconsistent.

        Show
        Julian Reschke added a comment - Proposed patch. Catching runtime exceptions is a bit unorthodox, but it avoids adding lots of null checks deeper in the call stacks. Recall that these checks aren't strictly needed unless the persistence is inconsistent.
        Julian Reschke made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Julian Reschke created issue -

          People

          • Assignee:
            Julian Reschke
            Reporter:
            Julian Reschke
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development