r110960 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110959‎ | r110960 | r110961 >
Date:20:34, 8 February 2012
Author:aaron
Status:ok (Comments)
Tags:filebackend, swift 
Comment:
Bumped $maxContCacheSize to handle container sharding a bit better. However, wikis large enough to need sharding would probably have sane 404 handling anyway, which avoids the need to hit a bunch of containers in one request anyway (like rendering thumbnails on parse).
Modified paths:
  • /trunk/phase3/includes/filerepo/backend/SwiftFileBackend.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/backend/SwiftFileBackend.php
@@ -24,7 +24,7 @@
2525 protected $auth; // Swift authentication handler
2626 protected $authTTL; // integer seconds
2727 protected $swiftAnonUser; // string; username to handle unauthenticated requests
28 - protected $maxContCacheSize = 20; // integer; max containers with entries
 28+ protected $maxContCacheSize = 100; // integer; max containers with entries
2929
3030 /** @var CF_Connection */
3131 protected $conn; // Swift connection handle
@@ -854,7 +854,7 @@
855855 if ( !$this->valid() && count( $this->bufferIter ) ) {
856856 $this->bufferAfter = end( $this->bufferIter );
857857 $this->bufferIter = $this->backend->getFileListPageInternal(
858 - $this->container, $this->dir, $this->bufferAfter, self::PAGE_SIZE
 858+ $this->container, $this->dir, $this->bufferAfter, self::PAGE_SIZE
859859 );
860860 }
861861 }
@@ -863,7 +863,7 @@
864864 $this->pos = 0;
865865 $this->bufferAfter = null;
866866 $this->bufferIter = $this->backend->getFileListPageInternal(
867 - $this->container, $this->dir, $this->bufferAfter, self::PAGE_SIZE
 867+ $this->container, $this->dir, $this->bufferAfter, self::PAGE_SIZE
868868 );
869869 }
870870

Comments

#Comment by Aaron Schulz (talk | contribs)   20:35, 8 February 2012

The other two lines are whitespace cleanup.

Status & tagging log