filebackend: improve FileBackendMultiWrite consistencyCheck()/resyncFiles()
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 29 Aug 2019 05:30:30 +0000 (22:30 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 30 Aug 2019 18:40:27 +0000 (18:40 +0000)
commit4ff2d43a80655edefcc83f54c0c32c59a1657d22
treed113fbaaf92e978494f0110ddc5dab840b4931bd
parent296e3d4f98d9d277569bd1838ce56799158965c5
filebackend: improve FileBackendMultiWrite consistencyCheck()/resyncFiles()

Report file stat errors and sha1/stat mismatches in consistencyCheck().
This will trigger resyncFiles() which will make second attempt to check
the consistency while also fixing any problems if possible. Make sure
that it also bails out if such errors occur again.

Improve consistencyCheck()/resyncFiles() variable naming and add more
comments to FileBackend::UNKNOWN.

Also replace wfDebugLog() calls with PSR logger calls and wfTimestamp()
calls with ConvertibleTimestamp::convert() calls.

Bug: T231086
Change-Id: I69bcee636c6d99970e9a6448bb8296c0790c7254
includes/libs/filebackend/FileBackendMultiWrite.php
languages/i18n/en.json
languages/i18n/qqq.json