Issue information

Issue ID
#1771
Status
Confirmed
Severity
None
Started
Hercules Elf Bot
Jun 25, 2008 10:30
Last Post
Hercules Elf Bot
Jun 25, 2008 10:30
Confirmation
N/A

Hercules Elf Bot - Jun 25, 2008 10:30

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&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.