EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/192763

Change subject: Don't overflow ms onng  historical uid generation
......................................................................

Don't overflow ms onng  historical uid generation

The maximum number of ms in a second should be 999, 1000 overflows
to the next second. Verified with phpunit using --repeat 5000 which
regularly fails this test prior to the patch, and no longer fails
post patch.

Fixes T90639

Bug: T90639
Change-Id: Ic040b69d033689448b4e57cac327318141446ebc
---
M includes/Import/Importer.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/63/192763/1

diff --git a/includes/Import/Importer.php b/includes/Import/Importer.php
index d375124..9d15cfc 100644
--- a/includes/Import/Importer.php
+++ b/includes/Import/Importer.php
@@ -133,7 +133,7 @@
                        // seconds
                        wfTimestamp( TS_UNIX, $timestamp ),
                        // milliseconds
-                       mt_rand( 0, 1000 )
+                       mt_rand( 0, 999 )
                );
 
                // The UIDGenerator is implemented very specifically to have

-- 
To view, visit https://gerrit.wikimedia.org/r/192763
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic040b69d033689448b4e57cac327318141446ebc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to