Crash in _findHighestSerialFilename
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python OOPS Date-dir repository |
Fix Released
|
Critical
|
Robert Collins |
Bug Description
I just got this traceback with version 0.0.17-0ubuntu1: http://
The problem happens in this bit of uniquefilealloc
for filename in os.listdir(
logid = filename.
if not logid.startswit
This would, I suppose, break whenever some file or subdirectory in the log directory has no dot in its name. I do see one thing in the log directory that doesn't have a dot in it: an oops directory seemingly created by python-oops-datedir-repo itself!
What gives?
Analysis
========
Our best theory is that two components of MaaS were sharing the same datedir repository and one was using an instanceid and one was not. This should allow trivial reproduction.
We could add code to handle this, or we could delete the instanceid based code entirely. AFAIK at this point nothing stops us deleting the code, which would be preferrable, as the non-instanceid code was written because the instanceid based code was architecturally slow and unreliable.
Related branches
- Steve Kowalik (community): Approve (code)
-
Diff: 590 lines (+26/-440)7 files modifiedNEWS (+5/-0)
README (+1/-4)
oops_datedir_repo/repository.py (+17/-30)
oops_datedir_repo/tests/__init__.py (+0/-1)
oops_datedir_repo/tests/test_repository.py (+3/-33)
oops_datedir_repo/tests/test_uniquefileallocator.py (+0/-160)
oops_datedir_repo/uniquefileallocator.py (+0/-212)
Changed in python-oops-datedir-repo: | |
assignee: | nobody → Robert Collins (lifeless) |
status: | Triaged → Fix Committed |
Changed in python-oops-datedir-repo: | |
status: | Fix Committed → Fix Released |
So a few things: - you shouldn't mix other things into the datedir repo - it will happily delete them if you run a pruner, for instance. I think that would avoid you having this error.
That said, you're using the deprecated naming scheme which is less concurrency safe and is much slower.... How are you constricting your repository object?