[ https://issues.apache.org/jira/browse/BEAM-3612?focusedWorklogId=157728&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-157728 ]
ASF GitHub Bot logged work on BEAM-3612: ---------------------------------------- Author: ASF GitHub Bot Created on: 23/Oct/18 17:33 Start Date: 23/Oct/18 17:33 Worklog Time Spent: 10m Work Description: aaltay closed pull request #6794: [BEAM-3612] Make type registration idempotent URL: https://github.com/apache/beam/pull/6794 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/sdks/go/pkg/beam/core/runtime/types.go b/sdks/go/pkg/beam/core/runtime/types.go index 8a0fa27de54..b853a6fc3f0 100644 --- a/sdks/go/pkg/beam/core/runtime/types.go +++ b/sdks/go/pkg/beam/core/runtime/types.go @@ -39,8 +39,8 @@ func RegisterType(t reflect.Type) string { panic(fmt.Sprintf("invalid registration type: %v", t)) } - if _, exists := types[k]; exists { - panic(fmt.Sprintf("type already registered for %v", k)) + if v, exists := types[k]; exists && v != t { + panic(fmt.Sprintf("type already registered for %v, and new type %v != %v (existing type)", k, t, v)) } types[k] = t return k ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 157728) Time Spent: 1h 50m (was: 1h 40m) > Make it easy to generate type-specialized Go SDK reflectx.Funcs > --------------------------------------------------------------- > > Key: BEAM-3612 > URL: https://issues.apache.org/jira/browse/BEAM-3612 > Project: Beam > Issue Type: Improvement > Components: sdk-go > Reporter: Henning Rohde > Assignee: Robert Burke > Priority: Major > Time Spent: 1h 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)