@@ -1514,7 +1514,6 @@ func (s *sysDB) recv(ctx context.Context, input WorkflowRecvInput) (any, error)
15141514 functionName := "DBOS.recv"
15151515
15161516 // Get workflow state from context
1517- // XXX these checks might be better suited for outside of the system db code. We'll see when we implement the client.
15181517 wfState , ok := ctx .Value (workflowStateKey ).(* workflowState )
15191518 if ! ok || wfState == nil {
15201519 return nil , newStepExecutionError ("" , functionName , "workflow state not found in context: are you running this step within a workflow?" )
@@ -1534,7 +1533,6 @@ func (s *sysDB) recv(ctx context.Context, input WorkflowRecvInput) (any, error)
15341533 }
15351534
15361535 // Check if operation was already executed
1537- // XXX this might not need to be in the transaction
15381536 checkInput := checkOperationExecutionDBInput {
15391537 workflowID : destinationID ,
15401538 stepID : stepID ,
@@ -1561,7 +1559,6 @@ func (s *sysDB) recv(ctx context.Context, input WorkflowRecvInput) (any, error)
15611559 }
15621560 defer func () {
15631561 // Clean up the condition variable after we're done and broadcast to wake up any waiting goroutines
1564- // XXX We should handle panics in this function and make sure we call this. Not a problem for now as panic will crash the importing package.
15651562 cond .Broadcast ()
15661563 s .notificationsMap .Delete (payload )
15671564 }()
@@ -1576,7 +1573,6 @@ func (s *sysDB) recv(ctx context.Context, input WorkflowRecvInput) (any, error)
15761573 }
15771574 if ! exists {
15781575 // Wait for notifications using condition variable with timeout pattern
1579- // XXX should we prevent zero or negative timeouts?
15801576 s .logger .Debug ("Waiting for notification on condition variable" , "payload" , payload )
15811577
15821578 done := make (chan struct {})
@@ -1796,7 +1792,7 @@ func (s *sysDB) getEvent(ctx context.Context, input WorkflowGetEventInput) (any,
17961792 return nil , fmt .Errorf ("failed to query workflow event: %w" , err )
17971793 }
17981794
1799- if err == pgx .ErrNoRows || valueString == nil { // XXX valueString should never be `nil`
1795+ if err == pgx .ErrNoRows || valueString == nil { // valueString should never be `nil`
18001796 // Wait for notification with timeout using condition variable
18011797 done := make (chan struct {})
18021798 go func () {
0 commit comments