dbos-inc / dbos-transact

The Transactional TypeScript Framework
https://docs.dbos.dev
MIT License
278 stars 19 forks source link

Possible problem in system_database #493

Closed demetris-manikas closed 4 weeks ago

demetris-manikas commented 1 month ago

I noticed that system_database.ts#L141C9-L141C27 executes two INSERT statements without wrapping them in a transaction. Is this by design or something that needs fixing?

kraftp commented 1 month ago

It's not incorrect--a workflow isn't fully started (and guaranteed to be reliable) until internalWorkflow (startWorkflow from the user perspective) has returned. That said, it might be cleaner if this was a transaction.

demetris-manikas commented 4 weeks ago

Ok. That's what the "do nothing on conflict" is safeguarding for. As you said it is not wrong so I close this one.