Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.3, 6.0
    • None
    • None
    • 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

      Attachments

        1. LUCENE-6525.patch
          15 kB
          Robert Muir

        Activity

          +1, thanks Rob.

          But this line is silly in TestIndexWriterConfig

          +    assertEquals(IndexWriterConfig.WRITE_LOCK_TIMEOUT, IndexWriterConfig.WRITE_LOCK_TIMEOUT);
          
          mikemccand Michael McCandless added a comment - +1, thanks Rob. But this line is silly in TestIndexWriterConfig + assertEquals(IndexWriterConfig.WRITE_LOCK_TIMEOUT, IndexWriterConfig.WRITE_LOCK_TIMEOUT);
          uschindler 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.

          uschindler 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.

          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?

          mikemccand 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?

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

          LUCENE-6525: Deprecate IndexWriterConfig's write lock timeout

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

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

          LUCENE-6525: Deprecate IndexWriterConfig's write lock timeout

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

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

          LUCENE-6525: remove deprecations from trunk

          jira-bot ASF subversion and git services added a comment - Commit 1685498 from rcmuir in branch 'dev/trunk' [ https://svn.apache.org/r1685498 ] LUCENE-6525 : remove deprecations from trunk

          Bulk close for 5.3.0 release

          shalin Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release
          tomoko Tomoko Uchida added a comment -

          This issue was moved to GitHub issue: #7583.

          tomoko Tomoko Uchida added a comment - This issue was moved to GitHub issue: #7583 .

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: