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
AbstractBlock.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
AutoblockExemptionList.php
Block.php
BlockActionInfo.php Remove meaningless @var documentation from constants 2024-10-09 09:33:12 +02:00
BlockCache.php
BlockCacheEntry.php
BlockCacheKey.php
BlockErrorFormatter.php
BlockManager.php Remove unchecked exception annotations 2024-09-17 22:20:58 +02:00
BlockPermissionChecker.php
BlockPermissionCheckerFactory.php
BlockRestrictionStore.php
BlockRestrictionStoreFactory.php
BlockUser.php
BlockUserFactory.php
BlockUtils.php
BlockUtilsFactory.php
CompositeBlock.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
DatabaseBlock.php
DatabaseBlockStore.php block: Fix DBS::acquireTarget() race using GET_LOCK() 2025-04-07 11:43:34 +00:00
DatabaseBlockStoreFactory.php
HideUserUtils.php
SystemBlock.php
UnblockUser.php
UnblockUserFactory.php
UserBlockCommandFactory.php