wiki.techinc.nl/includes/block
Tim Starling edea1bc177 block: Fix DBS::acquireTarget() race using GET_LOCK()
A crude solution for the acquireTarget() race condition. Use SQL
GET_LOCK() to lock the target from the acquireTarget() call until the
transaction is committed.

Add FOR UPDATE to the acquireTarget() SELECT, otherwise it just sees the
snapshot version of the row and inserts a new row anyway.

Add a test which reliably failed prior to the change.

Reword the ipb-block-not-found message. This is normal for simultaneous
blocks of the same target. Don't contact us. In the API, remap it to
"alreadyblocked".

Bug: T389028
Change-Id: I1fa35bf08d456a93930194786f77df389217ba61
(cherry picked from commit 2b65587e4d92e7f27661e8821b14f74ade939cfa)
2025-04-07 11:43:34 +00:00
..
Hook Add SpreadAnyEditBlock hook 2024-09-24 12:04:20 +01:00
Restriction Blocks documentation review 2023-09-06 13:48:07 +10:00
AbstractBlock.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
AutoblockExemptionList.php AutoblockExemptionList: inject and use a text formatter 2023-11-03 18:20:54 +00:00
Block.php Multiblocks preparation in User::getBlock(), PermissionManager and BlockManager 2023-10-20 10:07:50 +11:00
BlockActionInfo.php Remove meaningless @var documentation from constants 2024-10-09 09:33:12 +02:00
BlockCache.php Add cache to BlockManager 2023-10-12 13:42:58 +11:00
BlockCacheEntry.php block: Add type hints 2023-10-16 08:31:24 -04:00
BlockCacheKey.php Add "implements Stringable" to every class with "function __toString()" 2024-06-13 00:23:39 +00:00
BlockErrorFormatter.php Move Language and friends into Language namespace 2024-08-10 13:36:30 +02:00
BlockManager.php Remove unchecked exception annotations 2024-09-17 22:20:58 +02:00
BlockPermissionChecker.php Use real type hints for services etc. in includes/block/ 2024-07-31 08:54:31 +00:00
BlockPermissionCheckerFactory.php Use real type hints for services etc. in includes/block/ 2024-07-31 08:54:31 +00:00
BlockRestrictionStore.php Use real type hints for services etc. in includes/block/ 2024-07-31 08:54:31 +00:00
BlockRestrictionStoreFactory.php Use real type hints for services etc. in includes/block/ 2024-07-31 08:54:31 +00:00
BlockUser.php Use real type hints for services etc. in includes/block/ 2024-07-31 08:54:31 +00:00
BlockUserFactory.php
BlockUtils.php Use real type hints for services etc. in includes/block/ 2024-07-31 08:54:31 +00:00
BlockUtilsFactory.php Use real type hints for services etc. in includes/block/ 2024-07-31 08:54:31 +00:00
CompositeBlock.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
DatabaseBlock.php block: Deprecate and stop using $wgBlockTargetMigrationStage 2024-05-10 15:54:17 +10:00
DatabaseBlockStore.php block: Fix DBS::acquireTarget() race using GET_LOCK() 2025-04-07 11:43:34 +00:00
DatabaseBlockStoreFactory.php Use real type hints for services etc. in includes/block/ 2024-07-31 08:54:31 +00:00
HideUserUtils.php block: Deprecate and stop using $wgBlockTargetMigrationStage 2024-05-10 15:54:17 +10:00
SystemBlock.php Undeprecate SystemBlock 2023-09-06 13:52:12 +10:00
UnblockUser.php Use real type hints for services etc. in includes/block/ 2024-07-31 08:54:31 +00:00
UnblockUserFactory.php
UserBlockCommandFactory.php Use real type hints for services etc. in includes/block/ 2024-07-31 08:54:31 +00:00