Skip to content

Instantly share code, notes, and snippets.

@sheac
Last active February 21, 2018 00:12
Show Gist options
  • Save sheac/c9bd6abd272b89dff21527af884a89fe to your computer and use it in GitHub Desktop.
Save sheac/c9bd6abd272b89dff21527af884a89fe to your computer and use it in GitHub Desktop.

Known Causes

  1. Duplicate steps/fields within a single job

    • haven't confirmed any problems resulting from field-sharing yet
    • results from adding the same template multiple times
    • same DB row, but different jobBaseStepIds
  2. Shared steps/fields between clone/duplicate jobs and their originals/sources

    • haven't confirmed any problems resulting from field-sharing yet
    • results from JobController#CreateFromOffline
    • same DB row, and also same jobBaseStepId
      • wait, is it the same DB row???
  3. In JobController#CreateFromOffline, MaterializeJobOp is sent before services.JobRefWork() and services.ResolveReferences()


Known Problems

in services.ResolveReferences(), duplicate-within-job steps overwrite one-another's job-resolved maps

Suspected Problems

when thrifting duplicate-within-job steps, they share pointers to wrappers, and overwrite each others changes

  • haven't fully explored this -- don't know which pointers are the crucial ones
  • so far, efforts to fix it have instead broken it badly (nil pointer dereferences, etc)
  • looking at ToThriftStringWrapper()

the JobController.AddTemplates action doesn't send references in its event

  • currently trying to change the steps sent with the event, so they have references

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment