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

Eventing: No inter handler recursion error with collections

    XMLWordPrintable

Details

    Description

      Build: 7.0.0 build 3663, works fine with 6.6.1

      ./testrunner -i vikas-nodes.ini -t eventing.eventing_source_mutation.EventingSourceMutation.test_inter_handler_recursion,nodes_init=4,services_init=kv-eventing-index-n1ql,dataset=default,groups=simple,reset_services=True,skip_cleanup=True,source_bucket_mutation=true 

      Deploy 1 SBM handler as 

      2020-11-09 20:01:37 | INFO | MainProcess | test_thread | [eventing_base.deploy_function] Deploying the following handler code : Function_480073060_test_inter_handler_recursion with
      bindings: {'buckets': [{'alias': 'src_bucket', 'bucket_name': 'src_bucket', 'access': 'rw'}], 'metadata_bucket': 'metadata', 'source_bucket': 'src_bucket', 'curl': []} and
      settings: {'checkpoint_interval': 20000, 'cleanup_timers': False, 'dcp_stream_boundary': 'everything', '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-11-09 20:01:37 | INFO | MainProcess | test_thread | [eventing_base.deploy_function]
      function OnUpdate(doc, meta) {
          log('document', doc);
          while(true){
          try {
              var time_rand = random_gen();
              src_bucket[meta.id + time_rand] = doc;
              break;
          } catch(e) {
              log(e);
          }
          }
      }
      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;
      } 

      Deploy the same handler with the same binding, it should throw 

      ERR_INTER_FUNCTION_RECURSION

      2020-11-09 20:02:05 | INFO | MainProcess | test_thread | [eventing_base.deploy_function] Deploying the following handler code : Function_480073060_test_inter_handler_recursion_2 with
      bindings: {'buckets': [{'alias': 'src_bucket', 'bucket_name': 'src_bucket', 'access': 'rw'}], 'metadata_bucket': 'metadata', 'source_bucket': 'src_bucket', 'curl': []} and
      settings: {'checkpoint_interval': 20000, 'cleanup_timers': False, 'dcp_stream_boundary': 'everything', '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-11-09 20:02:05 | INFO | MainProcess | test_thread | [eventing_base.deploy_function]
      function OnUpdate(doc, meta) {
          log('document', doc);
          while(true){
          try {
              var time_rand = random_gen();
              src_bucket[meta.id + time_rand] = doc;
              break;
          } catch(e) {
              log(e);
          }
          }
      }
      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;
      } 

      But observed that it starts deploying and no error is thrown

      Attachments

        Issue Links

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

          Activity

            People

              jeelan.poola Jeelan Poola
              vikas.chaudhary Vikas Chaudhary
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty