Background
Logger::debouncedLog is defined here: https://gerrit.wikimedia.org/g/mediawiki/extensions/IPInfo/+/02f7561b060ab0f97e37e78e85ae9162ca9262f9/src/Logging/Logger.php#206
It checks whether a log entry has already been made within the last 24 hours (by default), and prevents logging if so.
We should make some improvements, as outlined in T303034#7752841:
It acquire an actor id for read. If the function has to acquire a new id (because there is no) then the next select on the logging table would not find anything, because there is nothing, findActorId is enough here.
There is no need to select the whole and exact COUNT(*) to only find there is nothing (code compares with 0). Just check if here is a match for one row and treat no match as false (Using selectRow with '1' - https://codesearch.wmcloud.org/search/?q=selectRow%5Cs*%5C(%5B%5E%2C%5D%2B%2C%5Cs*%271%27&i=nope&files=%5C.php&excludeFiles=&repos=).