| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This is a pure documentation change. It mostly removes empty lines from
comments (and entirely empty comments), as well as adds a few missing
documentation blocks and fixes a minor mistake. I hope it's ok to have
this in one patch. I can split it, please tell me.
Change-Id: I9668338602ac77b903ab6b02ff56bd52743c37c4
|
|
|
|
|
|
|
|
| |
It looks like there is something missing after the last statement
Also remove some other empty lines at begin of functions, ifs or loops
while at these files
Change-Id: Ib00b5cfd31ca4dcd0c32ce33754d3c80bae70641
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add the lag checks to LinksUpdate. Previously, only
LinksDeletionUpdate had any such checks.
* Remove the transaction hook usage, since the only two callers are
already lag/contention aware. Deferring them just makes the wait
checks pointless and they might end up happening all at once.
* Also set the visibility on some neigboring methods.
* Clean up LinksUpdate $existing variables in passing. Instead of
overriding the same variable, use a differently named variable
to avoid mistakes.
Bug: T95501
Change-Id: I43e3af17399417cbf0ab4e5e7d1f2bd518fa7e90
|
|
|
|
|
|
| |
The un-namespaced \ScopedCallback is deprecated.
Change-Id: Ie014d5a775ead66335a24acac9d339915884d1a4
|
|
|
|
|
| |
Bug: T92357
Change-Id: Id4f4991aca1ceeb74b59e980f09863041246a4fc
|
|\ |
|
| |
| |
| |
| |
| |
| | |
This lets callers use commitAndWaitForReplication() more easily.
Change-Id: I743bd1f989b8fb3b7ba3e5cc8ce1bb44c00f99af
|
|/
|
|
|
|
|
|
|
| |
This should lower the rate of "does not have outer scope" log
warnings in DBPerformance.
Also add traces to such logs.
Change-Id: I7d21ea745cae07e0fbbe4cd8de82e93f1d10e0a5
|
|
|
|
|
|
|
| |
Simplify DB callers by just having one code path.
All but some very old code paths bothered with these.
Change-Id: Iaf7a2f83146a0ed15995f9cfc74edcf16ae5a448
|
|
|
|
| |
Change-Id: I3e240b2eb5c1f6a21f1bc974c3d28f5755c7451a
|
|
|
|
| |
Change-Id: I53c9bf133f0707f2fa203ddd1a7fcb65be8b1329
|
|
|
|
|
|
|
| |
This assues that things like LinksUpdate/LinksDeletionUpdate will
have a proper ticket for commitAndWaitForReplication()
Change-Id: I8234510efb706394c39c4027ddf54ace76983aa9
|
|
|
|
|
|
|
|
| |
Update the only caller, which is a deprecated wrapper method.
Locking down this internal method makes it secure against
misuse with regards to recursion checks.
Change-Id: I3ed52dbe4c0ad52c7b5de92e81bfdc98a1737bcf
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Follows-up dc0cdc8a4d
Change-Id: Ib70585d9d10f6f6493a625697243e0a67796c272
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| | |
This will matter when commitMasterChanges() enforcement is tighter.
For now, any thing can still call that method anytime.
Change-Id: I0b08e9e9118a6c6118c117e3856d0a8e0ca3d457
|
|/
|
|
|
|
|
|
|
| |
This is more consistent with LoadBalancer, modern, and inclusive
of master/master mysql, NDB cluster, and MariaDB galera cluster.
The old constant is an alias now.
Change-Id: I0b37299ecb439cc446ffbe8c341365d1eef45849
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Also make ErrorPageError exceptions display themselves
in PRESEND mode. Before they were always suppressed.
* Make DataUpdate::runUpdates() simply wrap
DeferredUpdates::execute().
* Remove unused installDBListener() method, which was
basically moved to Maintenance.
* Enable DBO_TRX for DeferredUpdates::execute() in CLI mode
* Also perform sub-DeferrableUpdate jobs right after their
parent for better transaction locality.
* Made rollbackMasterChangesAndLog() clear all master
transactions/rounds, even if there are no changes yet.
This keeps the state cleaner for continuing.
* For sanity, avoid calling acquirePageLock() in link updates
unless the transaction ticket is set. These locks are
already redundant and weaker in range than the locks the
Job classes that run them get. This helps guard against
DBTransactionError.
* Renamed $type to $stage to be more clear about the order.
Change-Id: I1e90b56cc80041d70fb9158ac4f027285ad0f2c9
|
|
|
|
| |
Change-Id: I1b3ec21e07549f7250fa497f352fe1c131ddc88a
|
|
|
|
|
|
|
|
|
|
|
| |
Aside from there being no idle callback setting here, the
old addUpdate() code that runs updates allows nesting updates.
Make this support that for a few transitional commits. It will
be changed later to simply order the sub-updates after their
parent updates, keeping both outer scope for all updates and
locality of related updates.
Change-Id: I0ad4e9713a7893b981b7bb013e9db803eed663b2
|
|
|
|
| |
Change-Id: Ife65e4e90a35395e87f4f487f1cb871b67d92aa1
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
This sets triggers on master position waits typically called
after commitMasterChanges() or in commitAndWaitForReplication().
Change-Id: I127a8fe3cfc319abfa84fcd221ee2dae191c6d3b
|
|/
|
|
|
|
| |
Core subclasses have been updated.
Change-Id: Ic1beebeb7aec2b40d89c75637968e57e71a6c1a2
|
|
|
|
|
|
|
|
|
| |
* Avoid using deprecated functions.
* Switch to DataUpdate as the direct parent class as
no benefit was provided from SqlDataUpdate (which
should be deprecated soon).
Change-Id: I0f1c77128f3df658e6a0eaf4471ca48ac536c643
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds getAddedProperties and getRemovedProperties functions
to LinksUpdate. They are available only after the update, so for
extensions in the LinksUpdateComplete hook. This is useful for
example if an extension caches a page property; if the property
gets changed it may want to purge the cache.
This is similar to the getAddedLinks and getRemovedLinks
functions.
Change-Id: I0c73b3d181f32502da75687857ae9aeff731f559
|
|
|
|
|
|
|
|
|
| |
This fixes a phpunit test error, wherein {{NUMBEROFFILES}} would give
the number of files in the host wiki, not in the temporary database,
when Scribunto was installed, due to a Scribunto phpunit data provider
calling SiteStats::pages().
Change-Id: Ic0d021a72addaa2a13a6b94fd34dccc423de3a8f
|
|
|
|
| |
Change-Id: Iabc291cd1f3c5390ca8bcc5da64a0ff01a082575
|
|
|
|
|
|
| |
This does not really belong in SqlDataUpdate.
Change-Id: I7166e50696483371f95db3a8b6bce44b0f866ccd
|
|
|
|
|
|
| |
This also does sanity checks to avoid breaking transactions
Change-Id: I7453c245eee25a26243e606970ef5f79b21a8141
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Do not commit() inside masterPosWait(). This could happen
inside JobRunner::commitMasterChanges, resulting in
one DB committing while the others may or may not later commit.
* Migrate some commit() callers to commitMasterChanges().
* Removed unsafe upload class commit() which could break
outer transactions.
* Also cleaned up the "flush" flag to make it harder to misuse.
Change-Id: I75193baaed979100c5338abe0c0899abba3444cb
|
|/
|
|
|
|
|
|
| |
Support for this added to MWCallableUpdate and its helper method
in DeferredUpdates.
Bug: T141988
Change-Id: Ief150ea655036e2708557dd8ae847379edf21933
|
|
|
|
| |
Change-Id: I440041512feb47a998efb45e76e3fd00e0655752
|
|
|
|
| |
Change-Id: Ia595cee94a696b83b00fe9f2a91b49bce51c08dd
|
|
|
|
|
|
| |
Include the method that made the callback in the key.
Change-Id: Ifc7c486ee5c8d57b2516456569bb724cf7dc2b99
|
|
|
|
|
|
|
|
|
|
|
| |
* This puts the complex logic here after the commit step for
all DBs, making the main multi-DB transaction more likely
to be atomic.
* Made some cleanups to AtomicSectionUpdate and made it cancel
if the transaction is rolled back as it should.
* Also cleaned up some closures for PHP 5.4.
Change-Id: If2f7bb6b1ba6daf1cfdc934f27c32b0b10431a3d
|
|\ |
|
| |
| |
| |
| |
| |
| | |
The callback already flushes/commits the transaction.
Change-Id: I4875fef1434788ee0c689d9fcae6817863a1ba81
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: Ic6037b90edecc936432e997c504e81b3ae8732ad
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Removed the lockAndGetLatest() call which caused contention problems.
Previously, job #2 could block on job #1 in that method, then job #1
yields the row lock to job #2 in LinksUpdate::acquirePageLock() by
committing, then job #1 blocks on job #2 in updateLinksTimestamp().
This caused timeout errors. It also is not fully safe ever since
batching and acquirePageLock() was added.
* Add an outer getScopedLockAndFlush() call to runForTitle() which
avoids this contention (as well as contention with page edits)
but still prevents older jobs from clobbering newer jobs. Edits
can happen concurrently, since they will enqueue a job post-commit
that will block on the lock.
* Use the same lock in DeleteLinksJob to edit/deletion races.
Change-Id: I9e2d1eefd7cbb3d2f333c595361d070527d6f0c5
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A "currently-existing category" is defined as a category that either
contains any pages or has a description page. Thus:
* Category::initialize() now schedules an update to insert a row if the
title exits but the row is missing.
* Category::refreshCounts() now removes the row if the title doesn't
exist and the category is empty.
* WikiPage::onArticleCreate() loads the Category object, to trigger
bullet #1.
* WikiPage::updateCategoryCounts() refreshes the counts if it results in
the row showing 0 pages, to trigger bullet #2.
* LinksDeletionUpdate refreshes the counts if the row shows 0 pages, to
trigger bullet #2.
A maintenance script is provided to update the category table for this
new definition.
Bug: T28411
Bug: T50824
Change-Id: I0f0adf124c181ae5d3c7c95b3b5fb275a725794c
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T137326
Change-Id: Icce439210c6412c1824d8d5c411880825bb05643
|
|/
|
|
|
|
|
| |
Since this updates happens post-send or via the job queue, the
page object will be for a non-existing or newer page/redirect.
Change-Id: I20b583948157dccceca6eb1fbd25121822bf1b2f
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes LinksDeleteJob use the correct page ID when a new
page was later created at the title. The links and protection
rows to clear should always be for the ID of the actual page
being deleted.
This fixes a bug when pages are moved over redirects.
Bug: T128624
Change-Id: Id67a021539b97020e8dd32d56dba1b77c806f31c
|