Commit graph

15 commits

Author SHA1 Message Date
Umherirrender
cefcbbbc18 deferred: Add @phan-mandatory-param for function name arguments
Providing the function name is often optional from the php code,
but it is needed for better logging, so make it mandatory and let phan
report issues about this.

Bug: T374546
Follow-Up: I5227f2fa65850ac8c6f620900f22d1f4e7bfd470
Change-Id: I3becd23d3ba9f452a8afd833d509cd907e56ca47
2024-10-11 20:46:13 +02:00
Aaron Schulz
0e4fd5299a deferred: simplify $dependeeDbws parameter type for MWCallableUpdate
Remove null type hint and related conditional since it would be silly
to bother passing null and nothing is doing so according to code search.

Change-Id: I499aebd50433be8fd242461e86f5f9c69b300afe
2024-08-09 19:12:36 +00:00
Aaron Schulz
8454bf2314 deferred: pass $fname to MWCallableUpdate callbacks and improve comments
This is more convenient for callers since they can avoid the pattern
of setting $fname to __METHOD__ and needing $fname in the "use" clause.
This is also more consistent with AutoCommitUpdate/AtomicSectionUpdate.

Remove @since tags from @internal MWCallableUpdate class.

Change-Id: I67c58897dc366a55f43e0a61d56064b26d520c17
2024-08-08 15:50:00 +00:00
Bartosz Dziewoński
ef2329c012 rdbms: Warn about queries that don't provide the caller
Change-Id: Ib02dac0c607fc9931e1384a9cd7e989db683a4ff
2024-05-31 22:08:19 +00:00
James D. Forrester
8e940c4f21 Standardise all our class alias deprecation comments for ease of grepping
Change-Id: I7f85d931d3b79da23e87b4e5692b2e14be8fcaa0
2024-03-19 20:11:29 +00:00
James D. Forrester
67217d08df Namespace remaining files under includes/deferred
Bug: T166010
Change-Id: Ibd40734b96fd2900e3ce12239d09becfb4150059
2023-11-22 10:08:53 -05:00
Timo Tijhof
aca3c8203a deferred: Make DeferredUpdates docs more accessible
In prep for the next decoupling commit:

* Rephrase introduction to state what its actually for in practice.

* Remove mentions of implementation details in favour of inline
  comments, especially stuff relating to databases.
  Except for 1 thing, every integration with databases is already
  fully decoupled.

  Automatic cancellation on rollback works by having the caller pass
  on an IDatabase object to addCallableUpdate() for that specific
  update, which works even if it came from an unknown LBFactory
  or unknown service containter.

  Oppertunistic execution is triggered by service wiring, where
  MWLBFactory takes responsibility for having LBFactory notify the
  DeferredUpdates singleton; not the other way around.

Bug: T265749
Change-Id: I048d22ffe2fa3838d9a5f4aa4128c756185a6b2e
2023-08-25 01:16:17 +01:00
daniel
f59bf8a22f Use @internal instead of @private per policy
https://www.mediawiki.org/wiki/Stable_interface_policy mandates the use
of @internal. The semantics of @private was never properly defined.

Bug: T247862
Change-Id: I4c7c6e7b5a80e86456965521f88d1dfa7d698f84
2020-06-26 14:14:23 +02:00
Aaron Schulz
3496f0fca3 Make sure that each DataUpdate still has outer transaction scope
Bug: T221577
Change-Id: I620e461d791416ca37fa9ca4fca501e28d778cf5
2019-05-30 20:53:18 +00:00
Aaron Schulz
17080453a1 Support more coupled DBs in AtomicSectionUpdate/AutoCommitUpdate
This is useful for updating a secondary database based on a
commit to the main one, especially for using auto-commit.

Change-Id: Iad9084d2fb0490ecdfd5fcc97db33bfbcbfa5d21
2019-03-21 14:07:51 -07:00
Aaron Schulz
a21924267c deferred: Make MWCallableUpdate support a list of DB handles
Change-Id: I0371ecd20101c5e622497e5912676300b040865e
2018-01-31 20:04:48 -05:00
Aaron Schulz
488a647831 Move IDatabase/IMaintainableDatabase to Rdbms namespace
Change-Id: If7e8a8ff574661fd827de8bcec11d2c39a687300
2017-03-28 15:32:38 -07:00
Aaron Schulz
a2790b1b80 Remove wfGetCaller() dependency from DatabaseBase
Change-Id: I3e240b2eb5c1f6a21f1bc974c3d28f5755c7451a
2016-09-15 14:40:00 -07:00
Aaron Schulz
32a8eb1822 Make various MWCallableUpdate usages rollback-safe
Support for this added to MWCallableUpdate and its helper method
in DeferredUpdates.

Bug: T141988
Change-Id: Ief150ea655036e2708557dd8ae847379edf21933
2016-08-15 00:47:42 -07:00
Aaron Schulz
94ab94bd2d Renamed MWCallableUpdate class file to match the class
Change-Id: Ia595cee94a696b83b00fe9f2a91b49bce51c08dd
2016-07-26 03:42:57 -07:00
Renamed from includes/deferred/CallableUpdate.php (Browse further)