329
// - whether the primary set id was guessed (as opposed to found in versioning data)
330
// - error (can only be nil or serviceerror.NewerBuildExists)
331
>
func lookupVersionSetForPoll(data *persistencespb.VersioningData, caps *commonpb.WorkerVersionCapabilities) (string, []string, bool, error) {
version_sets.go
332
>
// For poll, only the latest version in the compatible set can get tasks.
333
>
// Find the version set that this worker is in.
334
>
// Note data may be nil here, findVersion will return -1 then.
335
>
setIdx, indexInSet := worker_versioning.FindBuildId(data, caps.BuildId)
336
>
if setIdx < 0 {
337
// A poller is using a build ID but we don't know about that build ID. This can happen
338
// in a replication scenario if pollers are running on the passive side before the data