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

Eventing: feed "from_now" not working with user defined collections

    XMLWordPrintable

Details

    Description

      Build: 7.0.0-3468

      Test: deploy handler with feed boundary as "from_now", observed that mutations are getting processed from beginning.

      ./testrunner -i vikas-nodes.ini -t eventing.eventing_sanity.EventingSanity.test_update_mutation_for_dcp_stream_boundary_from_now,nodes_init=4,services_init=kv-eventing-index-n1ql,dataset=default,groups=simple,reset_services=True,skip_cleanup=True,non_default_collection=True 

      2020-10-22 18:26:08 | INFO | MainProcess | test_thread | [eventing_base.deploy_function] Deploying the following handler code : Function_559954879_test_update_mutation_for_dcp_stream_boundary_from_now with
      bindings: {'buckets': [{'alias': 'dst_bucket', 'bucket_name': 'dst_bucket', 'scope_name': 'dst_bucket', 'collection_name': 'dst_bucket', 'access': 'rw'}], 'metadata_bucket': 'metadata', 'metadata_scope': 'metadata', 'metadata_collection': 'metadata', 'source_bucket': 'src_bucket', 'source_scope': 'src_bucket', 'source_collection': 'src_bucket', 'curl': []} and
      settings: {'checkpoint_interval': 20000, 'cleanup_timers': False, 'dcp_stream_boundary': 'from_now', 'deployment_status': False, 'description': 'Sample Description', 'log_level': 'INFO', 'skip_timer_threshold': 86400, 'sock_batch_size': 1, 'tick_duration': 5000, 'timer_processing_tick_interval': 500, 'timer_worker_pool_size': 3, 'worker_count': 3, 'processing_status': False, 'cpp_worker_thread_count': 1, 'execution_timeout': 20, 'data_chan_size': 10000, 'worker_queue_cap': 100000, 'use_memory_manager': True, 'deadline_timeout': 21, 'timer_storage_chan_size': 10000, 'dcp_gen_chan_size': 10000, 'language_compatibility': '6.5.0'}
      2020-10-22 18:26:08 | INFO | MainProcess | test_thread | [eventing_base.deploy_function]
      function OnUpdate(doc, meta) {
          log('document', doc);
          try {
              var time_rand = random_gen();
              dst_bucket[meta.id + time_rand] = doc;
          } catch(e) {
              log(e);
              //var time_rand = random_gen();
              //dst_bucket[meta.id + time_rand] = doc;
          }
      }
      function random_gen(){
          var rand = Math.floor(Math.random() * 20000000) * Math.floor(Math.random() * 20000000);
          var time_rand = Math.round((new Date()).getTime() / 1000) + rand;
          return time_rand;
      } 

      Attachments

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

        Activity

          People

            ankit.prabhu Ankit Prabhu
            vikas.chaudhary Vikas Chaudhary
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                PagerDuty