Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.3, 3.0.2, 4.0-ALPHA
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      IndexWriter has doAfterFlush which can be overridden by extensions in order to perform operations after flush has been called. Since flush is final, one can only override doAfterFlush. This issue will handle two things:

      1. Make doAfterFlush protected, instead of package-private, to allow for easier extendability of IW.
      2. Add doBeforeFlush which will be called by flush before it starts, to allow extensions to perform any operations before flush begings.

      Will post a patch shortly.

      BTW, any chance to get it out in 3.0.1?

        Activity

        Hide
        Shai Erera added a comment -
        • Added doBeforeFlush + call to it in doFlushInternal
        • Changed doAfterFlush to protected
        • Renamed testDoAfterFlush to testDoBeforeAfterFlush in TestIndexWriter (also fixed a bug in the test).

        I think this is ready for commit. Would be great if it can go out in 3.0.1 as well

        Show
        Shai Erera added a comment - Added doBeforeFlush + call to it in doFlushInternal Changed doAfterFlush to protected Renamed testDoAfterFlush to testDoBeforeAfterFlush in TestIndexWriter (also fixed a bug in the test). I think this is ready for commit. Would be great if it can go out in 3.0.1 as well
        Hide
        Michael McCandless added a comment -

        Patch looks good... thanks Shai!

        I think it's fine to backport to 3.0.x (trivial change), but, the 3.0.1 train has likely already left the building – we've voting now (take 2) on the artifacts. Maybe I'll backport and if we end up re-spinning it'll be in 3.0.1? Else 3.0.2...

        Show
        Michael McCandless added a comment - Patch looks good... thanks Shai! I think it's fine to backport to 3.0.x (trivial change), but, the 3.0.1 train has likely already left the building – we've voting now (take 2) on the artifacts. Maybe I'll backport and if we end up re-spinning it'll be in 3.0.1? Else 3.0.2...
        Hide
        Michael McCandless added a comment -

        Thanks Shai!

        Show
        Michael McCandless added a comment - Thanks Shai!
        Hide
        Michael McCandless added a comment -

        Woops, not on 3.0.1 (likely).

        Show
        Michael McCandless added a comment - Woops, not on 3.0.1 (likely).
        Hide
        Uwe Schindler added a comment -

        Merged to 2.9 revision: 949507

        Show
        Uwe Schindler added a comment - Merged to 2.9 revision: 949507

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development