Issue Information
-
#001771
-
0 - None Assigned
-
Confirmed
Issue Confirmations
-
Yes (0)No (0)
Originally posted by theultramage
http://www.eathena.w...er&showbug=1771
The storage saving mechanism works independently of char inventory saving. Since saves are done over a TCP connection and asynchronously, it is not really possible to make these operations transaction-safe. This would mean that if one of the two fails and the other succeeds, you get item duplication or item loss.
A suggestion is to change the way storage is being handled. Instead of keeping it in a separate cache and saving it at suitable times, instead make it a property of a character, like inventory or cart is. Since there can only be one account active at the same time, this approach is feasible.
Of course, it would require some hacking - since each storage entry is about 20 bytes and there are 300-1000 of them, this would inflate the session data structure by ~10%. Not sure if this is still acceptable.
http://www.eathena.w...er&showbug=1771
The storage saving mechanism works independently of char inventory saving. Since saves are done over a TCP connection and asynchronously, it is not really possible to make these operations transaction-safe. This would mean that if one of the two fails and the other succeeds, you get item duplication or item loss.
A suggestion is to change the way storage is being handled. Instead of keeping it in a separate cache and saving it at suitable times, instead make it a property of a character, like inventory or cart is. Since there can only be one account active at the same time, this approach is feasible.
Of course, it would require some hacking - since each storage entry is about 20 bytes and there are 300-1000 of them, this would inflate the session data structure by ~10%. Not sure if this is still acceptable.