Lucy
  1. Lucy
  2. LUCY-186

Terminate connection from SearchClient properly

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.1.0 (incubating), 0.2.0 (incubating), 0.2.1 (incubating)
    • Fix Version/s: 0.3.0 (incubating)
    • Component/s: Search
    • Labels:
      None

      Description

      SearchClient is currently leaving open its connections to SearchServer,
      causing SearchServer to crash when the first SearchClient goes away
      and a new one tries to connect. To mitigate this problem, we should
      have SearchClient's destructor invoke close().

      Bug hunted by Goran Kent on the user list: http://s.apache.org/bBf

      1. LUCY-186.patch
        0.6 kB
        Marvin Humphrey

        Activity

        Hide
        Marvin Humphrey added a comment -

        This patch invokes close() from within DESTROY(), and removes it from the
        vestigial NUKE(), which was an alternate destructor under an experimental
        object model from several years ago, long since discarded.

        Note that invoking close() from within DESTROY() is not entirely satisfactory,
        as a SearchClient which is displaced without being destroyed will continue to
        trigger bad behavior. To solve this problem more robustly, we need to raise
        the profile of close() and encourage userland code to use it. This will be
        even more important when we nest Lucy within a GC'd language like Ruby and can
        no longer count on deterministic destructor behavior.

        Show
        Marvin Humphrey added a comment - This patch invokes close() from within DESTROY(), and removes it from the vestigial NUKE(), which was an alternate destructor under an experimental object model from several years ago, long since discarded. Note that invoking close() from within DESTROY() is not entirely satisfactory, as a SearchClient which is displaced without being destroyed will continue to trigger bad behavior. To solve this problem more robustly, we need to raise the profile of close() and encourage userland code to use it. This will be even more important when we nest Lucy within a GC'd language like Ruby and can no longer count on deterministic destructor behavior.

          People

          • Assignee:
            Marvin Humphrey
            Reporter:
            Marvin Humphrey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development