• (nodebb)

    Transactions are hard.

    Like, that's just your opinion, man.

  • (nodebb)

    It's always good to think through how any given database operation behaves inside of a transaction.

    More to the point, it's always good to think about how any given sequence of database operations behaves outside of a transaction. (Is it, for example to create gibberish in the database by crashing halfway through the sequence?)

  • Darren (unregistered)

    Based on the myriad of WTFs we get here it's quite obvious that developers don't being to start to formulate the possibility of having a thought as to how a database operation works. That's the job of the framework or DBA, right?

  • (nodebb)

    Meh, transactions just sound like some pointless paranoia stuff. Surely that adds complexity at runtime and more importantly more code to write and think about. Ain't got no time for that. I mean it's a database, it's built to execute operations, so why would it fail? And if it does, we'll see them errors in the logs or some kind of exception somewhere. I mean, somebody else will see them because I have better things to do than check logs or catch exceptions or handle return error codes. That's for noobs, I write pro code that doesn't fail.

  • (nodebb) in reply to Ralf

    we'll see them errors in the logs or some kind of exception somewhere

    Except in the first commercial system I worked on where some bright spark had the idea to use a database table for logging. It worked really well except when some error occurred that caused the transaction to abort and roll back the database, including, of course, the log table.

  • Darren (unregistered) in reply to jeremypnet

    In a similar vein I was once asked to setup a system that would email the business if the email server went down.

    I suppose you could do that nowadays with Exchange SE - but only if the SE stands for Schrödinger Edition...

  • Faroguy (unregistered)

    Let's just say that choices were made 15 years ago and ever since I started the job in 2023 I've been handling the consequences.

Leave a comment on “Consistently Transactional”

Log In or post as a guest

Replying to comment #691235:

« Return to Article