Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-1785

A newly created node can remain invisible after commit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • Jena 3.13.0, Jena 3.13.1
    • Jena 3.14.0
    • TDB2
    • None

    Description

      A node once marked as non-present (NodeTableCache.nonPresent) can remain invisible even after it's created and the transaction is committed. That might happen because there's no guarantee that all newly created nodes will be eventually added to the "base" version ThreadBufferingCache.baseCache of theĀ node2id_Cache (as the localCache has limited capacity) or removed from the "base" version of the nonPresent cache (even if they were, there would still be a chance of re-adding them by some read transaction).

      The simplest fix is to get rid of the nonPresent cache which seems to be of limited use anyway. A more sophisticated fix would involve keeping track of all newly allocated nodes and their removal from the base version of nonPresent cache on transaction commit.

      To reproduce: see the attached test.

      Attachments

        1. TestVisibilityOfChanges.java
          3 kB
          Pavel Mikhailovskii

        Issue Links

          Activity

            People

              andy Andy Seaborne
              strangepleasures Pavel Mikhailovskii
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2.5h
                  2.5h