Page MenuHomePhabricator

Stop producing and cleanup wbmi-mediasearch-entities_* spam on WANObjectCache grafana dashboard
Closed, ResolvedPublic

Description

Dashboard: https://grafana.wikimedia.org/d/lqE4lcGWz/wanobjectcache-key-group

These entries are caused by improper keys in two callers within WikibaseMediaInfo. They should use hashing for the user provided key components. Now, I see:

$cacheKeys = $this->objectCache->makeMultiKeys(
			$searchQueries,
			function ( $query ) {
				return $this->objectCache->makeKey(
					$this->keyPrefix,
					$query,
					$this->inputLanguage,
					$this->outputLanguage
				);
			}
		);

The first key component (e.g. 'wbmi-mediasearch-entities' by default) should be useful name for a bucket of keys that have their metrics aggregated together. There should not be URLs/domains in them. Now, I see:

"wbmi-mediasearch-entities-$entitySearchBaseUri-$titleMatchBaseUri"

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 858438 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/extensions/WikibaseMediaInfo@master] Hash the query components in "wbmi-mediasearch-entities" keys

https://gerrit.wikimedia.org/r/858438

Change 858632 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/extensions/WikibaseMediaInfo@master] Avoid stats key collection name spam in "wbmi-mediasearch-entities" keys

https://gerrit.wikimedia.org/r/858632

Change 858438 merged by jenkins-bot:

[mediawiki/extensions/WikibaseMediaInfo@master] Hash the query components in "wbmi-mediasearch-entities" keys

https://gerrit.wikimedia.org/r/858438

@Cparle The main patch is still pending review.

Change 858632 merged by jenkins-bot:

[mediawiki/extensions/WikibaseMediaInfo@master] Avoid stats key collection name spam in "wbmi-mediasearch-entities" keys

https://gerrit.wikimedia.org/r/858632

Re-opening a reminder to prune existing data at https://grafana.wikimedia.org/d/lqE4lcGWz/wanobjectcache-key-group?orgId=1 from the two main Graphite hosts (one in each DC).

Re-opening a reminder to prune existing data at https://grafana.wikimedia.org/d/lqE4lcGWz/wanobjectcache-key-group?orgId=1 from the two main Graphite hosts (one in each DC).

Done.