if ( $itemID !== false && $ret !== false ) {
return $ret->getItem( $itemID );
}
+
return $ret;
}
$ret = array();
foreach ( $batched as $cluster => $batchByCluster ) {
$res = $this->batchFetchBlobs( $cluster, $batchByCluster );
+ /** @var HistoryBlob $blob */
foreach ( $res as $id => $blob ) {
foreach ( $batchByCluster[$id] as $itemID ) {
$url = $inverseUrlMap[$cluster][$id][$itemID];
}
}
}
+
return $ret;
}
if ( $dbw->getFlag( DBO_TRX ) ) {
$dbw->commit( __METHOD__ );
}
+
return "DB://$cluster/$id";
}
function &getMaster( $cluster ) {
$wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false;
$lb =& $this->getLoadBalancer( $cluster );
+
return $lb->getConnection( DB_MASTER, array(), $wiki );
}
if ( is_null( $table ) ) {
$table = 'blobs';
}
+
return $table;
}
if ( isset( $externalBlobCache[$cacheID] ) ) {
wfDebugLog( 'ExternalStoreDB-cache',
"ExternalStoreDB::fetchBlob cache hit on $cacheID\n" );
+
return $externalBlobCache[$cacheID];
}
}
$externalBlobCache = array( $cacheID => &$ret );
+
return $ret;
}
*
* @param string $cluster A cluster name valid for use with LBFactory
* @param array $ids A map from the blob_id's to look for to the requested itemIDs in the blobs
- * @return array A map from the blob_id's requested to their content. Unlocated ids are not represented
+ * @return array A map from the blob_id's requested to their content.
+ * Unlocated ids are not represented
*/
function batchFetchBlobs( $cluster, array $ids ) {
$dbr = $this->getSlave( $cluster );
" master on '$cluster' failed locating items: " .
implode( ',', array_keys( $ids ) ) . "\n" );
}
+
return $ret;
}
protected function parseURL( $url ) {
$path = explode( '/', $url );
+
return array(
$path[2], // cluster
$path[3], // id