Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-4117

Don't wrap function twice via make-durable-enqueue-command

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PDB 5.1.3
    • Fix Version/s: PDB 5.1.6, PDB 5.2.6, PDB 6.0.1
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      PuppetDB
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      PuppetDB should now defer commands to the local queue as originally intended, when there are processing errors during an initial HA sync (PE Only).
    • QA Risk Assessment:
      Needs Assessment

      Description

      In puppetdb-sync-service start, the call to attempt-initial-sync wraps the enqueue-command function via make-durable-enqueue-command.  Then attempt-initial-sync does the same thing with the result, producing a function that should be guaranteed to crash since the wrapper takes 5 args, but calls the function being wrapped with 6, producing:

      2018-09-20 09:41:22,150 ERROR [p.p.threadpool] Error processing command on thread initial-sync-7
      clojure.lang.ArityException: Wrong number of args (6) passed to: services/make-durable-enqueue-command/fn--46077
              at clojure.lang.AFn.throwArity(AFn.java:429)
              at clojure.lang.AFn.invoke(AFn.java:52)
              at puppetlabs.pe_puppetdb_extensions.sync.services$make_durable_enqueue_command$fn__46077.invoke(services.clj:302)
              at puppetlabs.pe_puppetdb_extensions.sync.services$process_or_enqueue_command.invokeStatic(services.clj:289)
              at puppetlabs.pe_puppetdb_extensions.sync.services$process_or_enqueue_command.invoke(services.clj:279)
              at puppetlabs.pe_puppetdb_extensions.sync.services$attempt_initial_sync$fn__46087.invoke(services.clj:325)
              at puppetlabs.pe_puppetdb_extensions.sync.services$blocking_sync$fn__45956$process_command_for_initial_sync__45959.invoke(services.clj:187)
              at puppetlabs.puppetdb.threadpool$dochan$fn__32853$fn__32854.invoke(threadpool.clj:117)
              at puppetlabs.puppetdb.threadpool$call_on_threadpool$fn__32848.invoke(threadpool.clj:95)
              at clojure.lang.AFn.run(AFn.java:22)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      

       

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  rob.browning Rob Browning
                  Reporter:
                  rob.browning Rob Browning
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: