Hi Jacopo,
Just chiming in.
David is absolutely right.
Transactions are always needed. For database reads, transactions are needed to prevent dirty
reads, for example. It should be obvious why update, delete, insert need transactions.
The use-transaction=false should only be off when the service does it's own transaction
management. Especially when a separate transaction outside of current transaction is needed --
such as when wanting to update a log regardless of how current transaction proceeds.
But be careful of forking transactions like that. Must make sure the forked transaction only
handles data that is not related to the data handled by the main transaction. I had a recent
project where we went into a "fork frenzy", forking more and more transactions to escape deadlocks.
Check that particular service to see if it does any transaction management of its own. I'll check
too, and report.
Jonathon
Jacopo Cappellato wrote:
Of course,
I'd love too to get Si's opinion... but I have the feeling he doesn't
like to participate in ML discussions. In the last months I don't
remember a message from Si, apart from the comments on Jira and the
commit logs.
Hopefully he will find a moment to jump in this discussion, if not, I
can try to open a Jira issue to capture Si's attention (I'm joking, Si)
Jacopo
David E Jones wrote:
It would be good to hear Si's comment on that, but my vote is
definitely for removing it.
A service should only really have use-transaction set to false if it
is doing it's own transaction management internally, like manually or
in sub-services only.
-David