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

Metadata bucket has lot of overhead even after all the timers are fired

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 6.0.0
    • 6.0.0
    • eventing
    • Enterprise Edition 6.0.0 build 1577 ‧ IPv4

    Description

      Steps to Repro

      • Deployed the following function. There were 2050 docs of metada bucket (expected)

        function OnUpdate(doc,meta) {
            var expiry = new Date();
            expiry.setSeconds(expiry.getSeconds() + 5000);
         
            var context = {docID : meta.id, random_text : "e6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh0R7Aumoe6cZZGHuh07Aumoe6cZZGHuh07Aumoe6cZZGHuh07Aumoe6"};
            createTimer(NDtimerCallback,  expiry, meta.id, context);
        }
         
        function NDtimerCallback(context) {
            dst_bucket[context.docID] = context.random_text;
        }
        

      • Added 20,000 docs to source bucket
      • Metadata had 52,000 on metadata bucket after all the timers were created (expected).
      • Waited for all the 20,000 timers to be fired.
      • Now metadata bucket has 12,568 docs left where as the expected is around 2050.

      I left the system for around 12+ hours in the hope they may get cleared, but that doesn't seem to be the case. I think the only way to clear this extra 10,000 docs is by undeploying a function which is not an ideal scenario. This is 10k overhead for 20k timers created.

      I have attached a view query results which emits meta.id from metadata bucket. Let me know if any other info is needed.

      This could be a dup of MB-30973 as well. However there is no deploy/undeploy loop here which happens in system test.

      I will try to add a automated test to validated this.

      Logs attached.

      Attachments

        1. backup_1614.zip
          14.06 MB
        2. backup.zip
          4.64 MB
        3. Screen Shot 2018-08-31 at 10.08.45 AM.png
          Screen Shot 2018-08-31 at 10.08.45 AM.png
          96 kB
        4. view_query_results.txt
          1.73 MB

        Issue Links

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

          Activity

            People

              varun.velamuri Varun Velamuri
              Balakumaran.Gopal Balakumaran Gopal
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty