Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-6525

Deprecate IndexWriterConfig's write lock timeout

    XMLWordPrintableJSON

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

          People

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

            Dates

              Created:
              Updated:
              Resolved: