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

Make Index Output Buffer Size Configurable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0, 4.1
    • 4.2, 6.0
    • core/store
    • None
    • New, Patch Available

    Description

      Currently, the buffered index input class allows sub-classes and users thereof to specify a size for the input buffer, which by default is 1024 bytes. In practice, this option is leveraged by the simple file and compound segment index input sub-classes.

      By the same token, it would be nice if the buffered index output class could open up it's buffer size for users to configure. In particular, this would allow sub-classes thereof to align the output buffer size, which by default is 16348 bytes, to that of the underlying directory's data unit. For example, a network-based directory might want to buffer data in multiples of it's maximum transmission unit. To use an existing use-case, the file system-based directory could potentially choose to align it's output buffer size to the operating system's file block size.

      The proposed change to the buffered index output class involves defining a one-arg constructor that takes a user-defined buffer size, and a default constructor that uses the currently defined buffer size.

      Attachments

        1. LUCENE-2453.patch
          3 kB
          Simon Willnauer
        2. LUCENE-2453.patch
          3 kB
          Karthick Sankarachary

        Issue Links

          Activity

            People

              simonw Simon Willnauer
              karthick Karthick Sankarachary
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: