The "save" command (or applying a bed of reality) only saves the player, not the apartment map.
This becomes a problem when a server crash causes a rollback, and the rollback covers a period where the player transferred items between inventory and apartment.
In such a case, you have a real chance of duped items (items are both in the player's inventory and apartment) or vanished items (item are neither in the player's inventory or apartment).
This is possible, because the player inventory and apartment are not saved in sync. So you can have a case where the player was saved before dropping an item, but the apartment was saved after the item was dropped. This results in duping.
Or the player was saved after dropping an item, but the apartment's most recent save (before the crash) was before the item was dropped. This results in vanishing.
Similar results for picking up items from your apartment, into inventory, too. Either way will cause problems after a crash and rollback, due to the saving of data out of sync.
This is not theory. It personally happened to me twice this past weekend during server rollbacks on Metalforge. During the first rollback, some of my items were duped. During the second rollback, some of my items (all of my coins, among other things) were vanished.
save cmd & bed of reality only saves player, not apartme
Moderator: Board moderators
-
- Luser
- Posts: 15
- Joined: Sat Feb 13, 2010 4:41 pm
Yes - there is no doubt this can happen.
Note that the opposite can be a benefit to the player (pick stuff up in apartment, save character, server crashes and that stuff is still in the apartment)
Ideally, the server should not crash - that's the real fix.
A problem with saving the apartment maps whenever the player is saved is that this can quickly drive up the load on the server.
It probably does make sense for the apartment maps to have a very low timeout if they don't already, so that the apartment gets saved out a matter of seconds after the player leaves the apartment (either through exiting the map or game), and not minutes.
Note that the opposite can be a benefit to the player (pick stuff up in apartment, save character, server crashes and that stuff is still in the apartment)
Ideally, the server should not crash - that's the real fix.
A problem with saving the apartment maps whenever the player is saved is that this can quickly drive up the load on the server.
It probably does make sense for the apartment maps to have a very low timeout if they don't already, so that the apartment gets saved out a matter of seconds after the player leaves the apartment (either through exiting the map or game), and not minutes.
-
- Luser
- Posts: 15
- Joined: Sat Feb 13, 2010 4:41 pm
I've tested the time to save on Metalforge by looking at the time it takes to be allowed to merge two otherwise identical alchemy piles, and it's closer to minutes than seconds at the moment.
Perhaps one programming fix would be to add an "archive bit" to the private apartment code.
Archive Bit is set when player enters apt.
Archive Bit is cleared when apt. is saved while player is NOT in apt.
When saving player, also save apt. if Archive Bit is set. Afterwards, perform check to see if bit can be safely cleared (player NOT in apt.)
Perhaps one programming fix would be to add an "archive bit" to the private apartment code.
Archive Bit is set when player enters apt.
Archive Bit is cleared when apt. is saved while player is NOT in apt.
When saving player, also save apt. if Archive Bit is set. Afterwards, perform check to see if bit can be safely cleared (player NOT in apt.)