Merge "Make WAN cache HOLDOFF_TTL smaller by combining db/snapshot lag"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 28 Oct 2015 15:10:40 +0000 (15:10 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 28 Oct 2015 15:10:40 +0000 (15:10 +0000)
1  2 
includes/libs/objectcache/WANObjectCache.php

@@@ -81,15 -81,13 +81,13 @@@ class WANObjectCache implements IExpiri
  
        /** Max time expected to pass between delete() and DB commit finishing */
        const MAX_COMMIT_DELAY = 3;
-       /** Max replication lag before applying TTL_LAGGED to set() */
-       const MAX_REPLICA_LAG = 5;
-       /** Max time since snapshot transaction start to avoid no-op of set() */
-       const MAX_SNAPSHOT_LAG = 5;
+       /** Max replication+snapshot lag before applying TTL_LAGGED or disallowing set() */
+       const MAX_READ_LAG = 7;
        /** Seconds to tombstone keys on delete() */
-       const HOLDOFF_TTL = 14; // MAX_COMMIT_DELAY + MAX_REPLICA_LAG + MAX_SNAPSHOT_LAG + 1
+       const HOLDOFF_TTL = 11; // MAX_COMMIT_DELAY + MAX_READ_LAG + 1
  
        /** Seconds to keep dependency purge keys around */
 -      const CHECK_KEY_TTL = 31536000; // 1 year
 +      const CHECK_KEY_TTL = self::TTL_YEAR;
        /** Seconds to keep lock keys around */
        const LOCK_TTL = 5;
        /** Default remaining TTL at which to consider pre-emptive regeneration */