'system:inbox' Count Listed as (5) Despite No Inbox Files
Hydrus version
679
Qt major version
Qt 6
Operating system
Windows 11
Install method
Extract
Install and OS comments
No response
Bug description and reproduction
- Observe 'system:inbox (5)' despite the search returning no files. Search is for 'combined local file domains' for 'all known tags', it has three of the top options 'include current tags', 'include pending tags', 'searching immediately' set and are green. Collection search is set as 'no collection'
Selecting 'how boned am I?' option under database and filtering for once again observed 'system:inbox (5)' returns 'No files!' and also shows the skeleton image.
Log output
Thank you for this report. Please check if the inbox numbers are incorrect for your other local file domains like 'my files' and write them down with the bad count. Then hit up database->regenerate->service info numbers and select each file domain that had incorrect numbers. You might need to switch the file domains around on the autocomplete you are looking at to force it to refresh the numbers--are they good after the regen call? Did any fail to get fixed?
Can you tell me which domains were bad, and were they all bad in the same way? Was it just 'combined local file domains' that was wrong? Can you estimate when the numbers went bad, and have you had anything like a crash during file import recently?
I haven't had a problem with miscounts like this in a while--the file counting logic on import/delete is pretty solid these days--but I think some crashes can cause a little database desync where one part of the db thinks a file import happened but another does not. If you have not had any crashes recently, but let's say you were running five different import pages with 10k+ files, that would be interesting to know. Since this is inbox specifically, I wonder if you have done any inbox stuff recently, like a mass archive, let's say by API or anything unusual?
Only 'my files' file service has been affected as it appears (two file services on instance)
Ran database->regenerate->service info numbers for the 'my files' file domain. After a quick file service swap on the search, the count went back to showing nothing (as it should)
However 'combined local file domains' still showed incorrect count (5) same as what 'my files' used to do. Ran the regenerate command on there too in order to get rid of this issue.
I have downloaders (around 5 pages) in a paused state. My best guess is it could have caused this issue. I have imported files in to the instance before this issue appeared, however the import was never interrupted, only some duplicates have been rejected by the instance with 'file already in db'. This Hydrus instance has never went through a crash to my knowledge, it was always clean exits and even if it crashed it was never in a state where the instance was under any use. The instance has a lot of opportunities to crunch on it's own for long periods of time so I'm guessing the chances it was doing something in a crash is also low. I have been archiving files through the archive/delete filter for a couple of days at around 3k images per day. Other than the final deletion/archival processes being quite slow, I never noticed any issues. I have also went through duplicates processing with no problems.
I'm closing this issue as the problem has been solved but I can answer any further questions if there are any.
Great, I am glad that fixed it. I am not sure what caused the bad count here. It doesn't sound like your client is doing anything crazy, so this 5 is probably due to some bad logic in the code, where I am having to do an unusual delete but am forgetting or mis-counting how many files are moving from one place to another. Please let me know if this comes back, and particularly if you identify it happening after doing something particular. It is probably something like an unusual duplicate pair merge action, or perhaps something like an undelete.