-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Actually remove dungeon sessions (#862)
Today, when you finish a dungeon, the session remains in the cache for the remainder of its expiry time, because issues were previously encountered with the client retrying record requests if they take too long, and then encountering errors because the session had been deleted on the first request. Now that the codebase makes better use of CancellationToken, this is much less likely if we put the eviction of the session right at the end of the response method. It is still possible if the request is cancelled during serialization, however. If we encounter issues we can make the RemoveDungeon method instead mark the session to be removed in 1 minute's time or similar. Also includes a refactoring of the DungeonService to implement a unit-of-work pattern, where the current session can be cached and modified in-memory without round-trips to the cache. This is primarily aimed at the DungeonStart logic which can require several updates after creating the session, arising from how the code is structured. Finally, makes sessions keyed by viewer ID, so that it isn't possible to get another player's session. It probably wasn't really possible before, given the astronomical likelihood of guessing/colliding GUIDs, but it makes sense to segregate this data by tenant all the same. **This key change is breaking, and the server should be taken down during the deployment.**
- Loading branch information
1 parent
d375c0f
commit 42a0a56
Showing
25 changed files
with
365 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.