| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- CategoryMembershipChangeJob is currently enqueued in
DerivedPageDataUpdater.
- This job is responsible for creating RC entries for category
membership changes that resulted from an edit, so it is semantically a
better fit for ChangeTrackingEventIngress instead.
- Idf6625d3e737e4a225648b0fd81cc929b095d315 unintentionally changed the
logic to enqueue this job for both direct content changes and
reconciliation requests, rather than only direct content changes.
Since the job creates RC entries, it should only be enqueued
as a result of direct content changes.
What:
- Move the logic of enqueueing CategoryMembershipChangeJobs into
ChangeTrackingEventIngress.
- Only enqueue CategoryMembershipChangeJobs for direct content changes
and update tests accordingly.
- Resolve the old TODO of making this logic MCR-aware by checking
whether any changed content slot supports categories as a precondition
of enqueueing the job, rather than only checking the main slot.
Bug: T390636
Change-Id: Icfe33ccc6cfa391e65ecae21d8c1d575dc247ee3
|
|
|
|
| |
Change-Id: I0d8d2237500ed6f18439410c902d47c42e4119bc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update a few remnant references inside the library while at it.
* WANObjectCache: Didn't use ATTR/QOS directly, and getQoS test
already implemnented as BagOStuff const.
Update getQoS() docs to match.
* WANObjectCache: Already documented ERR_ as BagOStuff::ERR_.
And Codesearch confirms no use of `WANObjectCache::(ERR|ATTR|QOS)`.
* MemcachedClient: Switch from referencing one to the other.
The class is not directly used outside core, only via
BagOStuff.
* Implicitly remove unused ATTR_EMULATION by not carrying over.
Follows-up:
* e8275758fe (I20fde9fa5c) Split IExpiringStore from BagOStuff,
and re-use in WANObjectCache.
* 74be3a0150 (I4377fc3f53) Move ERR_ from BagOStuff to IExpiringStore.
* 69950da666 (Ia862c5111a) Replace IExpiringStore with StorageAwareness.
* 59b002b866 (I9885f53f00) Remove StorageAwareness::QOS_LOCALITY_.
* ec90b543ab (I8dec3f73fa) Remove StorageAwareness::QOS_EMULATION_SQL.
* 62bdd78817 (I5649a29310) Adopt ERR_ in MemcachedClient.
* e5a3e36bd1 (I836735b1fe) Mark StorageAwareness as internal.
Bug: T353529
Bug: T364652
Change-Id: I1dfde995e29d5264611cf3500d61fe4d8631a7d7
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
- PageStateEvent models a change in page state, so it should provide
access to the state before and after
What:
- add getPageRecordBefore() and getPageRecordAfter() to PageStateEvent
- Move getPage() from PageStateEvent down to PageRevisionUpdatedEvent.
- Add getPageId() to PageStateEvent.
- Add getDeletedPage to PageDeletedEvent
Bug: T388588
Depends-On: I76b09f2275a74d02e5701de2082d6b256d6b3b78
Change-Id: I94c52c0314e5dbe9adf82aab732f2e54ca42f686
|
| |
| |
| |
| |
| | |
Bug: T353458
Change-Id: I3cf44dfe5425f2efb8409c83571c427447b053af
|
|/
|
|
|
|
|
|
|
| |
In MediaWiki/Exception, to follow PSR-4 per plural vs. singular (this can be
changed later if people really care). Also, move the couple of exceptions in
here that were already namespaced in the MW-top-level into the new space.
Bug: T353458
Change-Id: I12ed850ae99effb699a6d7ada173f54e72f0570e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- In I38cb5622238bc674 we started to write EditResults to the stash
unconditionally. That's several orders of magnitude more than
before and would flood the cache. We should only store the
EditResult for reverts, and only if RC patrolling is enabled.
- While this logic should really be in ChangeTrackingEventIngress,
that currently doesn't work because some extensions need the
cache to be updated before their hooks run, but the ingress is only
triggered post-send.
What:
- Make DerivedPageDataUpdater skip writing to EditResultCache if the
edit is not a revert or RC patrolling is not enabled.
Bug: T388573
Bug: T386217
Change-Id: I4ac6efbdc1713c87153e66e0520c9f749a7a2a9d
|
|
|
|
|
| |
Bug: T353458
Change-Id: I95690a312e356c45dbeed607d32fb0e4626690cf
|
|
|
|
|
| |
Bug: T353458
Change-Id: I2ae4577de79832b082adca282ff73cfabc8f9392
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Revert tag updates belong to change tracking, so move them out of the
content component.
Note: The behavior of updateRevertTagAfterPageUpdated() is covered by
the existing RevertedTagUpdateIntegrationTest.
Bug: T388573
Change-Id: I38cb5622238bc674ad97d6f47ecd4b8d09f45349
|
|/
|
|
|
| |
Bug: T353458
Change-Id: Ibe1810f1c71316a9124e1dc6ae405097dafd5267
|
|
|
|
|
| |
Bug: T353458
Change-Id: I7a9c74f2106655d41ae029742090253f541bd4a6
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- Use consistent naming scheme based on "before" and "after" to
represent the change.
What:
- rename getOldRevision to getLatestRevisionBefore
- rename getNewRevision to getLatestRevisionAfter
Bug: T388588
Change-Id: I30078f606f457981987d95def5b2aaae181f0690
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
- clarify naming after modeling discussions
What:
- Rename PageEvent to PageStateEvent
- Rename PageUpdatedEvent to PageRevisionUpdatedEvent.
Bug: T388588
Change-Id: I987c93a443d364782e692e2cf71b878ccbc5a2fa
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| | |
Bug: T387838
Change-Id: I7bc38f07d1edea71e2dcd62781ec1c7f1fb0d261
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
- We want to replace the PageDeletionComplete hook with an event
- We want to validate our design for the hierarchical event type system
and the modeling of page events.
What:
- Introduce PageDeletedEvent
- Make DeletePage emit PageDeletedEvent
- Move update triggers from DeletePage into ingress objects:
- search index
- message cache
- module cache
Bug: T379932
Change-Id: I01490fbaf33118eba109aa91908783117ba5aa20
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
- All changes that cause a dummy revision to be created should
trigger a PageUpdatedEvent.
What:
- Make WikiPage::doUpdateRestrictions use PageUpdater
Bug: T198297
Bug: T384691
Change-Id: Ib3196c2d9b964d149d733688bfc7a8d2b5733f4e
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- Rollback and undo should not use the "edit" cause, since they are
triggered by a dedicated user action.
What:
- Introduce constants for rollback and undo into PageUpdateCauses.
- Set update cause in McrUndoAction, EditPage, WikiPage, and
Rollbackpage.
- Add test cases asserting the properties of the PageUpdatedEvent for
manual reverts, undos, and rollbacks.
Bug: T378936
Change-Id: If3174732846795e322ddd61257459395eb10e73e
|
|
|
|
|
|
|
|
|
|
|
| |
Removed in 60941f701c98190be3de66ff7702003dd6507e30, this comment
provides more information than the type declarations—it states the array
value type of `$softwareTags`, not only the fact that it’s an array
(which is sadly all what type declarations can state). So even if this
causes double maintenance, it’s worth being kept because it helps Phan
(and IDEs) flag issues.
Change-Id: I0f88570454e94743eff2c48da2513db9f3fba741
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- Listeners that want to skip processing if the page content didn't
change should generally not skip reconciliation requests.
PageUpdatedEvent should offer getters that make this straightforward.
What:
- Add isNominalContentChange that will return false for dummy revisions
but true for null edits. This is the preferred way for listeners to
determine whether they can skip redundant processing of page content.
- Rename isContentChange to isEffectiveContentChange, to distinguish
it from isNominalContentChange.
- Rename isRevisionChange to isRevisionHistoryChange, to make it clear
that the change affects the sequences of revisions.
- Add test cases to PageUpdaterTest asserting the expected update
propagation for null edits and dummy revisions.
- Change ingress objects so that:
- the message cache is updated for null edits
- module caches are not cleared for dummy revisions
Bug: T383552
Change-Id: Idf6625d3e737e4a225648b0fd81cc929b095d315
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- PageUpdater creates an EditResult on null-edits, the PageUpdatedEvent
should also have it.
What:
- Call DerivedPageDataUpdater::prepareUpdate for null edits
Bug: T386938
Change-Id: Ie6e59e0b089a973f338bafb646893e3334d2ea14
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- When introducing saveDummyRevision() in I1f8c0ac68b, we didn't account
for the fact that most (but not all) dummy revisions should be marked
as minor edits.
What:
- Add a $flag parameter to saveDummyRevision()
Bug: T198297
Bug: T387067
Change-Id: I1db3ccc816cdb0e2a93593625306a9080b7204eb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- Improve consistency, naming, documentation and definition of flags.
What:
- remove direct access to flags, provide a separate getter for each flag
instead.
- Deprecate EDIT_SUPPRESS_RC in favor of EDIT_SILENT
- Introduce EDIT_IMPLICIT to replace "automated" mode
- Introduce FLAG_RECONCILIATION_REQUEST into PageEvent.
- Introduce isReconciliationRequest into DomainEvent.
Bug: T383552
Change-Id: I2bffbb5810376829f871e1840ca799a8d8232dda
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Creating dummy revisions was a fiddly multi-stage process.
PageUpdater should just offer a method for doing it.
Change how we create dummy revisions in:
* LocalFile
* MovePage
* ImportReporter
Bug: T198297
Bug: T384691
Change-Id: I4c7595ce24337ab637a4e0fdbb313fc77d452a15
|
|
|
|
|
|
|
|
| |
Use modern php syntax to call a callable.
Reduce the stack trace to improve performance
and better IDE and static analyzer support
Change-Id: I9ef131032a662a3b8db69aa7079dbd51f88f575a
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This moves the following update logic out of
DerivedPageDataUpdater::doUpdates into listeners for the PageUpdated event:
- ResourceLoader: WikiModule::invalidateModuleCache to
ResourceLoaderEventIngress.
- TalkPageNotifications: TalkPageNotificationManager::setUserHasNewMessages
to UserNotificationEventIngress.
Bug: T378936
Change-Id: I5f2083b09d90cbd20abe2e8143a000dfc4d02aae
|
|/
|
|
|
|
|
| |
with 'Recreated'
Bug: T385253
Change-Id: I0a4ddc4187ef4441381fcb15a79a710a4a7891ee
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why: Derived slot updates modify a revision's meta-data, not the
revision content. Also, they may apply to old revisions. They
don't fit the semantics of PageUpdatedEvent.
What: Suppress PageUpdatedEvent in PageUpdater::doUpdate
Bug: T381299
Bug: T378936
Change-Id: Ic70bf675dd18a8b85b056aba3f80f8dec37f2643
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces the concept of a "cause" and "performer" into
PageUpdatedEvent. Causes are e.g. "edit" or "import" or "move".
The performer is the same as the author for edits, but not
necessarily for undeletions, moves, etc.
Note that cause and performer were already being tracked in
DerivedPageDataUpdater for logging purposes.
PageUpdatedEvent was modeling the cause using flags.
This change formalizes the concept of "cause" and "performer"
and ensures it is handled consistently.
As an aside, this simplifies some test cases in
DerivedPageDataUpdaterTest to avoid confused state.
Bug: T383031
Bug: T383095
Change-Id: I79bde5604790636c91848f265fffd81d6348a8b4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- It's useful to be able to listen to sets of compatible event types.
What:
- Make DomainEvents aware of a list of types they are compatible with.
- Make EventDispatchEngine dispatch to all compatible listeners,
registered for any of the supported types.
- Move all page events to their own namespace
Bug: T384330
Change-Id: I96bde2cfaf198e409a6ef3a24101ee7d02d57959
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mark `ExpirationAwareness` as internal, as it is effectively a private
trait for the benefit of de-duplication between MapCacheLRU,
BagOStuff, and WANObjectCache APIs.
Callers should reference constants from the object ($cache::TTL_DAY)
or type (BagOStuff/WANObjectCache) that their code is interfacing
with. Fix a handful of cases that didn't do this.
Bug: T353529
Change-Id: Ic46e09c848e69db3d22219d2231274c81c0cb275
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Same as Ia294bf4 did for 1-line comments. This patch removes slightly
more complex 2-line PHPDoc comments that don't add any new information
to the code, but literally repeat what the code already says.
They say "don't document the code, code the documentation", and we
are doing this more and more. We just tend to forget to remove the
obsolete comments.
Note I'm also removing a line of text in a few cases when it's very
short and literally says the same as the method name. Again, such
comments add zero new information.
Change-Id: I01535404bab458c6c47e48e5456403b7a64198ed
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I assume these are all either auto-generated by an IDE or the
language-level type declarations have been added later. In any case
the comments don't add any new information to what the code already
says. This is just extra clutter that makes the code harder to read,
I would argue.
There are many, many more comments like this. In this patch I
intentionally focus on the most trivial 1-line comments.
Change-Id: Ia294bf4ce0d8a77036842fe25884bc175c2b0e7d
|
|
|
|
|
|
|
|
| |
adds a new tag in core titled mw-recreated to note when a new page is a recreation
Bug: T56145
Co-Authored-by: Rockingpenny4 <rockingpenny4@gmail.com>
Change-Id: Ib8ffe3fba73d0464f3fd353138456b07e7afc7d7
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- Things like rollbacks use the EDIT_INTERNAL flag to bypass
the edit stash, but should still be counted as edits.
What:
- Introduce a separate toggle into PageUpdater for marking an
update as automated.
Bug: T382592
Change-Id: Iec70d510d7104df0f57885a842b2583250a07135
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows-up If163674dd0, which introduced new use of AtEase.
While at it, convert the other AtEase call to @-operator as well,
and improve its documentation to separate the three reasons,
and make it obvious which one the two bug/task references belong
to.
Bug: T380347
Change-Id: Icaf4be5979ef6dce05c9e0511282f47f71f9dd10
|
|
|
|
|
|
|
|
|
| |
isset() should only be used to suppress errors, not for null check.
When the property is always defined, there is no need to use isset.
Found by a new phan plugin (2efea9f989)
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#isset
Change-Id: I186e799256fbaf5ee77558bd146f9418dd5eaacc
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes some DeferredUpdates run more consistently between web
and CLI modes. Previously, deferred updates from before endAtomic()
would run during endAtomic() in CLI mode due to the transaction
listener in MWLBFactory. The listener callback will be removed soon,
in which case those updates would remain deferred after the commit
from endAtomic() and would run when the DeferredUpdates::addUpdate
call is made for the getAtomicSectionUpdate() update.
Depends-On: I33d94c1c54bc266c74c980ef1c73fd99a55c268e
Change-Id: I50aa9fe9387c9b7b7ff97dfd39a2830bce647db8
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Suppress issues with gzinflate and include the blob address on the
wfWarn call to get more information for debugging
Bug: T380347
Change-Id: If163674dd040459eec692866fc05976e201ee6fe
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In Ice76519 we lost the mechanism for triggering updates for the search
index and message cache on import and undeletion. This change restores
the trigger for these updates.
To achieve this, the logic for instantiating PageUpdatedEvents is moved
into DerivedPageDataUpdater. Perhaps the firing of the event can be
moved into that class eventually.
To improve consistency, the flags field in PageUpdatedEvent is changed
from a bitmap corresponding to the flags field in PageUpdater to an
array corresponding to the options array in DerivedPageDataUpdater.
For regression testing, this change defines new test traits, one for
each ingress. These traits define the expected behavior of each ingress
in each relevant situation (edit, move, import, and undeletion).
Bug: T381225
Bug: T381299
Change-Id: Ib0d1dd143160fb64d42cacfbc75fbb55f5614c1c
|
|\ \ |
|