CouchDB
  1. CouchDB
  2. COUCHDB-1196

The server cannot terminate properly closing all the databases

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.2
    • Component/s: Database Core
    • Labels:
      None
    • Skill Level:
      New Contributors Level (Easy)

      Description

      It looks like the values in the couch_dbs_by_name table are tuples of 2
      terms in couch_server.terminate():

      terminate(_Reason, _Srv) ->
      [couch_util:shutdown_sync(Pid) || {_, {Pid, _LruTime}} <-
      ets:tab2list(couch_dbs_by_name)],
      ok.

      But in the rest of the code the values are always 3-term-tuples:

      {opened, Pid, LruTime}

      or

      {opening, Opener, [Froms]}

      The patch is expected to solve the issue. All the tests pass.

      See also: http://thread.gmane.org/gmane.comp.db.couchdb.devel/15741

        Activity

        Hide
        Filipe Manana added a comment -

        Applied to trunk.
        Only removed the 'ok' return from terminate function. lists:foreach/1 returns ok and also the return value of this function is in fact irrelevant.

        Thanks again Andrey

        Show
        Filipe Manana added a comment - Applied to trunk. Only removed the 'ok' return from terminate function. lists:foreach/1 returns ok and also the return value of this function is in fact irrelevant. Thanks again Andrey
        Hide
        Filipe Manana added a comment -

        Thanks Andrey, will try it soon

        Show
        Filipe Manana added a comment - Thanks Andrey, will try it soon

          People

          • Assignee:
            Unassigned
            Reporter:
            Andrey Somov
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development