Issue information

Issue ID
#16
Status
Working as Intended
Severity
None
Started
Hercules Elf Bot
Sep 6, 2007 5:54
Last Post
Hercules Elf Bot
Mar 15, 2012 13:07
Confirmation
N/A

Hercules Elf Bot - Sep 6, 2007 5:54

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=16

CODE
CCharDB_txt::CCharDB_txt(const char *dbcfgfile) :?basics::CTimerBase(300*1000),

CODE
bool CCharDB_txt::timeruserfunc(unsigned long tick)
{
????// we only save if necessary:
    ????// we have do some authentifications without do saving
    ????if( savecount > 100 )
    ????{
        ????????savecount=0;
        ????????cMailDB.flush(true);
        ????????this->do_saveChars();
    ????}
    ????return true;
}

If I'm reading this correctly, it checks every 5 minutes whether more than 100 save requests were done?
So if you have only a few players (night) / testserver where save requests happen only occassionally, then it would take... hours? to actually get the files to save. Those aren't very stable conditions :X

The reason I'm bringing this up is that it's very hard to do tests when the server drops everything when restarting itself.

Oh, and you might want to revise this one
CODE
// How often should the server save all files? (In seconds)
autosave_time: 15
According to the code, it only applies to accreg saving. Very misleading in my opinion, since it actually only saves one of them.

(originally reported as topic:154632)