( ctx context.Context, tx sqlplugin.Tx, shardID int32, namespaceID primitives.UUID, workflowID string, runID primitives.UUID, archetypeID chasm.ArchetypeID, serializer serialization.Serializer, )
| 938 | } |
| 939 | |
| 940 | func assertNotCurrentExecution( |
| 941 | ctx context.Context, |
| 942 | tx sqlplugin.Tx, |
| 943 | shardID int32, |
| 944 | namespaceID primitives.UUID, |
| 945 | workflowID string, |
| 946 | runID primitives.UUID, |
| 947 | archetypeID chasm.ArchetypeID, |
| 948 | serializer serialization.Serializer, |
| 949 | ) error { |
| 950 | currentRow, err := tx.LockCurrentExecutions(ctx, sqlplugin.CurrentExecutionsFilter{ |
| 951 | ShardID: shardID, |
| 952 | NamespaceID: namespaceID, |
| 953 | WorkflowID: workflowID, |
| 954 | ArchetypeID: archetypeID, |
| 955 | }) |
| 956 | if err != nil { |
| 957 | if err == sql.ErrNoRows { |
| 958 | // allow bypassing no current record |
| 959 | return nil |
| 960 | } |
| 961 | return serviceerror.NewUnavailablef("assertCurrentExecution failed. Unable to load current record. Error: %v", err) |
| 962 | } |
| 963 | return assertRunIDMismatch(runID, currentRow, serializer) |
| 964 | } |
| 965 | |
| 966 | func assertRunIDAndUpdateCurrentExecution( |
| 967 | ctx context.Context, |
no test coverage detected