MCPcopy Create free account
hub / github.com/temporalio/temporal / updateCurrentExecution

Function updateCurrentExecution

common/persistence/sql/execution_util.go:1060–1077  ·  view source on GitHub ↗
(
	ctx context.Context,
	tx sqlplugin.Tx,
	row sqlplugin.CurrentExecutionsRow,
)

Source from the content-addressed store, hash-verified

1058}
1059
1060func updateCurrentExecution(
1061 ctx context.Context,
1062 tx sqlplugin.Tx,
1063 row sqlplugin.CurrentExecutionsRow,
1064) error {
1065 result, err := tx.UpdateCurrentExecutions(ctx, &row)
1066 if err != nil {
1067 return serviceerror.NewUnavailablef("updateCurrentExecution failed. Error: %v", err)
1068 }
1069 rowsAffected, err := result.RowsAffected()
1070 if err != nil {
1071 return serviceerror.NewUnavailablef("updateCurrentExecution failed. Failed to check number of rows updated in current_executions table. Error: %v", err)
1072 }
1073 if rowsAffected != 1 {
1074 return serviceerror.NewUnavailablef("updateCurrentExecution failed. %v rows of current_executions updated instead of 1.", rowsAffected)
1075 }
1076 return nil
1077}
1078
1079func (m *sqlExecutionStore) buildExecutionRow(
1080 namespaceID string,

Calls 1

Tested by

no test coverage detected