Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9842

UpdateRequestProcessors have no way to guarantee the closing of resources used for a request.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.5, 7.0
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      You cannot count on finish being called for an UpdateRequestProcessor because whether or not it's called in the face of errors is dependent on the other processors in the chain.

      We should make UpdateRequestProcessor closeable and implement this so that close is guaranteed to be called. I'm playing around with this in a patch for another issue.

      1. SOLR-9842.patch
        14 kB
        Mark Miller

        Activity

        Hide
        hossman Hoss Man added a comment -

        +1 with 2 questions for mark...

        1. why Closable and not AutoClosable?
        2. can you think of any reason not to deprecate finish() an remove it from master? (moving all logic in the current finish impls into new close() methods?)
        Show
        hossman Hoss Man added a comment - +1 with 2 questions for mark... why Closable and not AutoClosable? can you think of any reason not to deprecate finish() an remove it from master? (moving all logic in the current finish impls into new close() methods?)
        Hide
        markrmiller@gmail.com Mark Miller added a comment -

        Yeah I guess AutoClosable is now preferred.

        I had thought about deprecating finish, but I wasn't sure it was easy to have the tolerant processor work correctly with a single final method. In the end it seemed simpler to keep considering finish as containing logic that is part of the request - failures are captured by the tolerant processor and close as just for releasing resources - if releasing a resource fails, log an issue, but don't consider the request as having been unsuccessful.

        If you have an idea though, let me know.

        Show
        markrmiller@gmail.com Mark Miller added a comment - Yeah I guess AutoClosable is now preferred. I had thought about deprecating finish, but I wasn't sure it was easy to have the tolerant processor work correctly with a single final method. In the end it seemed simpler to keep considering finish as containing logic that is part of the request - failures are captured by the tolerant processor and close as just for releasing resources - if releasing a resource fails, log an issue, but don't consider the request as having been unsuccessful. If you have an idea though, let me know.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit f2f8154d0b6fe8d56974b008a0121d056dee3163 in lucene-solr's branch refs/heads/master from markrmiller
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f2f8154 ]

        SOLR-9842: UpdateRequestProcessors have no way to guarantee the closing of resources used for a request.

        Show
        jira-bot ASF subversion and git services added a comment - Commit f2f8154d0b6fe8d56974b008a0121d056dee3163 in lucene-solr's branch refs/heads/master from markrmiller [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=f2f8154 ] SOLR-9842 : UpdateRequestProcessors have no way to guarantee the closing of resources used for a request.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 6f9079ec3d0675d1d96870ad56283ca1c1288d27 in lucene-solr's branch refs/heads/branch_6x from markrmiller
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6f9079e ]

        SOLR-9842: UpdateRequestProcessors have no way to guarantee the closing of resources used for a request.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 6f9079ec3d0675d1d96870ad56283ca1c1288d27 in lucene-solr's branch refs/heads/branch_6x from markrmiller [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6f9079e ] SOLR-9842 : UpdateRequestProcessors have no way to guarantee the closing of resources used for a request.

          People

          • Assignee:
            markrmiller@gmail.com Mark Miller
            Reporter:
            markrmiller@gmail.com Mark Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development