Page MenuHomePhabricator

Remove Database{Property,Item}TermStore transactions control code
Closed, ResolvedPublic

Description

In Database{Property,Item}TermStore, remove the whole transaction code, effictively letting the users of these classes handle transactions.

Event Timeline

I provided only the removal here as an option as it follows the a general principle of pushing transaction handling in db related code as father outside in the layers as it makes sense (usually that's better handled in Application layer in layered architecture.. considering here users of the new term store as being Application layer to it).

If you feel better about still handling transactions, when the user do not, that's also fine.. although YAGNI here also suggest that we postpone that case as we don't have it yet in Wikibase/Wikidata cases as far as I understand.

alaa_wmde renamed this task from Let Database{Property,Item}TermStore user handle transactions to Remove Database{Property,Item}TermStore transactions control code.Jun 8 2019, 11:26 AM
alaa_wmde removed alaa_wmde as the assignee of this task.
alaa_wmde removed a subscriber: alaa_wmde.
alaa_wmde added a subscriber: alaa_wmde.

I think removing it is fine for now. Also, this means we can likely (partially) revert Ic25f4817ae: Inject ILBFactory, not ILoadBalancer, into stores, since we won’t need the transaction methods anymore. (Or should we still inject an ILBFactory? I really don’t understand the difference between the two classes, but in all the other classes we added, we inject an ILoadBalancer.)

Change 516471 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Remove transaction logic from Database*TermStores

https://gerrit.wikimedia.org/r/516471

Change 516472 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Inject ILoadBalancer, not ILBFactory, into stores

https://gerrit.wikimedia.org/r/516472

Change 516471 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Remove transaction logic from Database*TermStores

https://gerrit.wikimedia.org/r/516471

Change 516472 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Inject ILoadBalancer, not ILBFactory, into stores

https://gerrit.wikimedia.org/r/516472

Lucas_Werkmeister_WMDE closed this task as Resolved.Jun 11 2019, 1:51 PM