Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-19690

Embed activity without output not executing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0.0
    • Component/s: Thor
    • Labels:
      None

      Description

      Embedded activities that do not have an output are not being executed. Internally these activities are running as an CExternalSlaveActivity instead of an CExternalSlaveSinkActivity causing the incorrect method to be executed. (createOutput vs execute)

      The following code from HPCC-13036 does not execute:

      r := RECORD
          UNSIGNED id;
          STRING name;
      END;
      
      traceDataset(streamed dataset(r) ds, boolean isLocal = false) := EMBED(C++ : activity, local(isLocal))
      #include <stdio.h>
      #body
          for(;;)
          {
              const byte * next = (const byte *)ds->nextRow();
              if (!next)
              {
                  next = (const byte *)ds->nextRow();
                  if (!next)
                      return;
              }
      
              unsigned __int64 id = *(__uint64 *)(next);
              size32_t lenName = *(size32_t *)(next + sizeof(__uint64));
              const char * name = (char *)(next + sizeof(__uint64) + sizeof(size32_t));
      
              printf("id(%u) name(%.*s)\n", (unsigned)id, lenName, name);
              rtlReleaseRow(next);
         }
      
      ENDEMBED;
      
      ds := DATASET([
          {1,'GCH'},{2,'RKC'},{3,'Count Dracular'}, {4, 'Boris'}
          ], r);
      
      traceDataset(ds);
       

       

        Attachments

          Activity

            People

            • Assignee:
              mcmuja01 James McMullan
              Reporter:
              mcmuja01 James McMullan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: