403
setIdx, _ := worker_versioning.FindBuildId(data, buildId)
404
if setIdx < 0 {
405
>
// A workflow has a build ID set, but we don't know about that build ID. This can
version_sets.go
406
>
// happen in replication scenario: the workflow itself was migrated and we failed
407
>
// over, but the versioning data hasn't been migrated yet. Instead of rejecting it,
408
>
// we can guess a set ID based on the build ID. If the build ID was the first in
409
>
// its set on the other side, then our guess is right and things will work out. If
410
>
// not, then we'll guess wrong, but when we get the replication event, we'll merge
411
>
// the sets and use both ids.
412
>
// Note that in the add task case, we have to persist this guessed set id before we
413
>
// can accept the task.
414
>
guessedSetId := hashBuildId(buildId)
415
>
return guessedSetId, true, nil
416
>
}
417
set = data.VersionSets[setIdx]
418
}