Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398908 )

Change subject: Use cache set options in SqlBlobStore::getBlob
......................................................................

Use cache set options in SqlBlobStore::getBlob

This is useful for sanity in the case of DB rollback.

Change-Id: I2e50183835a97bc82efee53a407a624f0e35f53f
---
M includes/Storage/SqlBlobStore.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/398908/1

diff --git a/includes/Storage/SqlBlobStore.php 
b/includes/Storage/SqlBlobStore.php
index 0714633..4d163d5 100644
--- a/includes/Storage/SqlBlobStore.php
+++ b/includes/Storage/SqlBlobStore.php
@@ -26,6 +26,7 @@
 
 namespace MediaWiki\Storage;
 
+use Wikimedia\Rdbms\Database;
 use DBAccessObjectUtils;
 use ExternalStore;
 use IDBAccessObject;
@@ -269,7 +270,9 @@
                        // TODO: change key, since this is not necessarily 
revision text!
                        $this->cache->makeKey( 'revisiontext', 'textid', 
$blobAddress ),
                        $this->getCacheTTL(),
-                       function () use ( $blobAddress, $queryFlags ) {
+                       function ( $unused, &$ttl, &$setOpts ) use ( 
$blobAddress, $queryFlags ) {
+                               $setOpts += Database::getCacheSetOptions( 
$this->getDBConnection( DB_REPLICA ) );
+
                                return $this->fetchBlob( $blobAddress, 
$queryFlags );
                        },
                        [ 'pcGroup' => self::TEXT_CACHE_GROUP, 'pcTTL' => 
IExpiringStore::TTL_PROC_LONG ]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e50183835a97bc82efee53a407a624f0e35f53f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

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

Reply via email to