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

Wrong defaults are used for bucket memory watermarks

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Yes

    Description

      Issue has been seen on master.

      ns_server will sometimes initialize KV buckets with mem_low_wat=2147483647;mem_high_wat=2147483647. I'm not sure when that happens but it has been observed on macOS with cluster_connect -n 1 -T n0:kv -s 512.

      The cause seems to be: https://review.couchbase.org/c/ns_server/+/208705/8/apps/ns_server/src/ns_bucket.erl#557

      Where defaults of MAX_32BIT_UNSIGNED_INT are used. MAX_32BIT_UNSIGNED_INT is surprisingly defined to be the maximum 32-bit signed integer value.

      The memcached configuration.json defaults these values to the maximum value of a size_t, which is a 64-bit unsigned integer. When that value is specified, KV will default to the typical values.

      As a result of the incorrect value being specified, both LWM and HWN are set to 2 GiB, which may be above the bucket quota.

      Attachments

        For Gerrit Dashboard: MB-61947
        # Subject Branch Project Status CR V

        Activity

          People

            vesko.karaganev Vesko Karaganev
            vesko.karaganev Vesko Karaganev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change

                PagerDuty