Lucene - Core
  1. Lucene - Core
  2. LUCENE-6525

Deprecate IndexWriterConfig's write lock timeout

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Followup from LUCENE-6508

      We should ultimately remove this parameter, it is just sugar over a "sleeping lock factory" today that sleeps and retries until timeout, like the old code.

      But really if you want a lock that blocks until its obtained, you can simply specify the sleeping lock factory yourself (and have more control over what it does!), or maybe an NIO implementation based on the blocking FileChannel.lock() or something else.

      So this stuff should be out of indexwriter and not baked into our APIs.

      I would like to:
      1) deprecate this, mentioning to use the sleeping factory instead
      2) change default of deprecated timeout to 0, so you only sleep if you ask. I am not really sure if matchVersion can be used, because today the default itself is also settable with a static setter <-- OVERENGINEERED

        Activity

        Hide
        Michael McCandless added a comment -

        +1

        Show
        Michael McCandless added a comment - +1
        Hide
        Michael McCandless added a comment -

        +1, thanks Rob.

        But this line is silly in TestIndexWriterConfig

        +    assertEquals(IndexWriterConfig.WRITE_LOCK_TIMEOUT, IndexWriterConfig.WRITE_LOCK_TIMEOUT);
        
        Show
        Michael McCandless added a comment - +1, thanks Rob. But this line is silly in TestIndexWriterConfig + assertEquals(IndexWriterConfig.WRITE_LOCK_TIMEOUT, IndexWriterConfig.WRITE_LOCK_TIMEOUT);
        Hide
        Uwe Schindler added a comment -

        +1 to remove the lock timeout. That patch somehow only contains removal of the SleepWrapper in index package, but no addition in store package. The line that Mike already mentioned looks like a search/replace error.

        Show
        Uwe Schindler added a comment - +1 to remove the lock timeout. That patch somehow only contains removal of the SleepWrapper in index package, but no addition in store package. The line that Mike already mentioned looks like a search/replace error.
        Hide
        Michael McCandless added a comment -

        That patch somehow only contains removal of the SleepWrapper in index package, but no addition in store package.

        I think this is just because it was "svn mv"d?

        Show
        Michael McCandless added a comment - That patch somehow only contains removal of the SleepWrapper in index package, but no addition in store package. I think this is just because it was "svn mv"d?
        Hide
        ASF subversion and git services added a comment -

        Commit 1685379 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1685379 ]

        LUCENE-6525: Deprecate IndexWriterConfig's write lock timeout

        Show
        ASF subversion and git services added a comment - Commit 1685379 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1685379 ] LUCENE-6525 : Deprecate IndexWriterConfig's write lock timeout
        Hide
        ASF subversion and git services added a comment -

        Commit 1685382 from Robert Muir in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1685382 ]

        LUCENE-6525: Deprecate IndexWriterConfig's write lock timeout

        Show
        ASF subversion and git services added a comment - Commit 1685382 from Robert Muir in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1685382 ] LUCENE-6525 : Deprecate IndexWriterConfig's write lock timeout
        Hide
        ASF subversion and git services added a comment -

        Commit 1685498 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1685498 ]

        LUCENE-6525: remove deprecations from trunk

        Show
        ASF subversion and git services added a comment - Commit 1685498 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1685498 ] LUCENE-6525 : remove deprecations from trunk
        Hide
        Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

        Show
        Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development