wiki.techinc.nl/includes/ResourceLoader/dependencystore
Timo Tijhof 1016d3b9ba ResourceLoader: Fix confusing DependencyStoreException trace logs
After the roll-out of $wgResourceLoaderUseObjectCacheForDeps on
WMF wikis, there was an unrelated database spike that caused some
error messages:

> DependencyStoreException:
> Cannot access the database: Too many connections (db1132)

I found this confusing, because servers shouldn't be using old
DepStore class any more (ref T311788?). And because the new store
is x2.mainstash, whereas the reported hostname is an s1.enwiki host.

I wasted some time not trusting the code path as there was no Rdbms
trace available to confirm for sure that this isn't an unrelated query
that happens to be caught during the DepStore interaction (e.g. some
generic MW code running from a hook, or Rdbms internal query from
LoadMonitor etc).

Improve telemetry by preserving the original trace.

I considered passing `$e` as third parameter to
DependencyStoreException, but since the new implementation doesn't
actually use this class, it's effectively going to remain unused in the
future and would not reliably indicate anything in particular to callers
unaware of which implementation is in use. There's also some benefit
to being able to aggregate and filter out specific db issues, which
is made harder by the same issue being reported multiple different
ways through wrapped errors.

The old implementation will remain for one release as default, and
probably one release after that as option for any third parties that
encounter an issue during upgrade so as to not block their upgrade
while we find/address the issue in question.

Bug: T113916
Change-Id: Iaa3907fc3aa0622daa9648eabfdd7efabdd4f2a9
2022-08-01 20:46:26 -07:00
..
DependencyStore.php ResourceLoader: Fix confusing DependencyStoreException trace logs 2022-08-01 20:46:26 -07:00
KeyValueDependencyStore.php ResourceLoader: Remove DependencyStore::renew 2022-07-12 15:25:39 -07:00
SqlModuleDependencyStore.php ResourceLoader: Fix confusing DependencyStoreException trace logs 2022-08-01 20:46:26 -07:00