GETTING STUCK IN THE MARKET MAZE
Okay, I've taken a few steps to fix the people getting stuck in the market issue.
Problem Statement:
- We have a dynamic room (A) in a maze with 1 or more exits
- One exit leads to another dynamic room (B)
- We clean up B room entirely via an automated process
- After cleanup, we still have an exit in A that points to the invalid room B which is no longer a room due to cleanup. Unclear why this is happening, possible race condition. Hard to track down.
Solutions:
No idea why the exit isn't cleaning up, but if it IS cleaned cleaned the 'dynamic' exit takes over and functionality returns. Thus I have made 'look' in the maze rooms check for valid exits, and if it finds invalid ones, it recycles them. Restoring functionality. This is the 'hacky fix' for if we find ourselves in this state.
In order to find ourselves in the bad state less often: The maze controller was set to have the maze rooms recycle after 60 seconds. This doesn't need to be so often. I made it an hour moving forward. They will still recycle, just not as fast, so the likelihood of getting caught in a bad state due to multiple things recycling is less likely.
CAVEATS
- I am sure this will still happen sometimes
- It is hard to test fully, so I may have missed something
- It's not a perfect fix that addresses the root cause, but it's better than nothing.
(Edited by Slither at 8:46 am on 5/28/2023)