jenkins-bot has submitted this change and it was merged.
Change subject: Run UpdateRepo jobs on time() + 2, not time() + 1
......................................................................
Run UpdateRepo jobs on time() + 2, not time() + 1
Just adding +1 to time() doesn't mean we wait at least
a second, it means we'll wait max. a second.
Due to this actual delay depends on the time until
the next second... due to this add 2, so that we wait at
least one second which should be enough for slaves to
catch up in case of no replag.
Bug: T92789
Change-Id: Ieb2028d41f1e9edadbab6ee7c175514c9458eb73
---
M client/includes/UpdateRepo/UpdateRepo.php
1 file changed, 5 insertions(+), 3 deletions(-)
Approvals:
Aude: Looks good to me, approved
jenkins-bot: Verified
diff --git a/client/includes/UpdateRepo/UpdateRepo.php
b/client/includes/UpdateRepo/UpdateRepo.php
index 86192ad..89f158b 100644
--- a/client/includes/UpdateRepo/UpdateRepo.php
+++ b/client/includes/UpdateRepo/UpdateRepo.php
@@ -170,7 +170,7 @@
/**
* Get the time (in seconds) for which the job execution should be
delayed
* (if delayed jobs are enabled). Defaults to the max replag of any
pooled
- * DB server + 1 seconds.
+ * DB server + 2 seconds.
*
* @return int
*/
@@ -179,8 +179,10 @@
// This should be good enough, especially given that lagged
servers get
// less load by the load balancer, thus it's very unlikely
we'll end
// up on the server with the highest lag.
- // Note: Always add at least +1 here, otherwise this can be -1
- return $lagArray[1] + 1;
+ // We add +2 here, to make sure we have a minimum delay of a
full
+ // second (this is being added to time() so +1 actually just
means
+ // wait until this second is over).
+ return $lagArray[1] + 2;
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/197350
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb2028d41f1e9edadbab6ee7c175514c9458eb73
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits