Lucene - Core
  1. Lucene - Core
  2. LUCENE-2966

SegmentReader.doCommit should be sync'd; norms methods need not be sync'd

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      I fixed the failure in TestNRTThreads, but in the process tripped an assert because SegmentReader.doCommit isn't sync'd.

      So I sync'd it, but I don't think the norms APIs need to be sync'd – we populate norms up front and then never change them. Un-sync'ing them is important so that in the NRT case calling IW.commit doesn't block searches trying to pull norms.

      Also some small code refactoring.

      1. LUCENE-2966.patch
        3 kB
        Michael McCandless

        Activity

        Hide
        Michael McCandless added a comment -

        Simple patch.

        Show
        Michael McCandless added a comment - Simple patch.
        Hide
        Michael McCandless added a comment -

        Pushing this to 3.2 – removing sync'd from the norms methods is a tad spooky, and I think the concurrency bug only results in a false assert trip, so, we can let this fix bake only in trunk I think...

        Show
        Michael McCandless added a comment - Pushing this to 3.2 – removing sync'd from the norms methods is a tad spooky, and I think the concurrency bug only results in a false assert trip, so, we can let this fix bake only in trunk I think...
        Hide
        Robert Muir added a comment -

        Bulk closing for 3.2

        Show
        Robert Muir added a comment - Bulk closing for 3.2

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Michael McCandless
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development