Page MenuHomePhabricator

IPInfo logger should queue a logging job instead of writing directly
Closed, ResolvedPublic2 Estimated Story Points


Discovered in QA of T294658: Create a log entry when the RevisionHandler is called. Logging while trying to expand the infobox (and therefore writing a user preference update to the db) results in a 500 error from the ip info api call because of a lock contention (at least in sqlite). Additionally, it's preferred practice to not write on the request [1]. Instead, the logging function should queue up the job and that way callers of the function (T294658: Create a log entry when the RevisionHandler is called and T294657: Create a log entry when the LogHandler is called) can continue to just call the function without worrying about how it's going about logging.


Event Timeline

Change 759570 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/IPInfo@master] Make LogIPInfoAccessJob

ARamirez_WMF set the point value for this task to 2.Feb 8 2022, 5:59 PM

Change 759570 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] Make LogIPInfoAccessJob

Moving to Done because this is a bit under-the-hood and will be tested via the parent tasks