Janitor sometimes fails to clean up characters #391
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
java
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
agony-forge/agonyforge#391
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If the game shuts down while characters are still in it, and they are still in the database when it restarts, they appear as linkdead characters. The
CharacterJanitorruns once per minute to clean those up, but I've noticed that it fails sometimes. The failure seems to be due to a foreign key on thelocation_componenttable still existing. My working theory at this point is that it is because the character is holding or wearing items. The cascading delete doesn't propagate to the items. Because the items aren't being deleted and they reference the character, the character cannot be deleted.Confirmed. If I enter the game and quit with nothing in my inventory it's fine. If I am holding or wearing something it throws an exception. The code for closing your browser and for being linkdead are essentially the same, just acting on different events. For the moment we could just drop any held/worn items on the floor?