Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-7787

Bad custom reduce function kills the server

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • 2.1.0
    • 2.0, 2.0.1
    • view-engine
    • Security Level: Public
    • None
    • Tested on:
      - Ubuntu 12 : crash(does not restart automatically)
      - OS X : crash then restart

    Description

      If a developer does a emit in the reduce function the server crashes.

      For example:

      1. Install Couchbase 2.0
      2. Load the beer sample data
      3. Create a new view in the beer-sample data
      4. Keep the default values
      5- Add a custom reduce function:

      function (keys, values, rereduce)

      { emit("this is bad"); }


      6- Save
      7- Click "Show Results"

      >> Server Crashed

      I know that it is not something that is supposed to be done, but one developer that was "playing" around with views and try to understand how reduce works made a mistake in a copy and paste and kills his server.

      Our view engine should not crash the server, when bad code is inserted.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              FilipeManana Filipe Manana (Inactive)
              tgrall Tug Grall (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty