Permalink
2 comments
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Check_db
Add a check_db on char-serv startup to ensure all sql-tables was loaded correctly and avoid error on runtime. Fix OnInterIfInitOnce being executed on reloadscript, (now only done at server startup)
- Loading branch information
Showing
with
268 additions
and 17 deletions.
- +3 −0 conf/char_athena.conf
- +3 −0 npc/re/scripts_main.conf
- +1 −0 npc/scripts_test.conf
- +8 −0 npc/test/OnInterInit.txt
- +240 −1 src/char/char.c
- +1 −0 src/char/char.h
- +0 −10 src/common/showmsg.c
- +2 −1 src/login/login.c
- +1 −0 src/login/login.h
- +7 −2 src/map/chrif.c
- +0 −2 src/map/elemental.c
- +1 −0 src/map/map.c
- +1 −0 src/map/map.h
- +0 −1 src/map/npc.c
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
| @@ -0,0 +1 @@ | ||
| npc: npc/test/OnInterInit.txt |
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
| @@ -0,0 +1,8 @@ | ||
| - script OnInterChk -1,{ | ||
| OnInterIfInit: | ||
| debugmes "Loaded OnInterIfInit <-------"; | ||
| end; | ||
| OnInterIfInitOnce: | ||
| debugmes "Loaded OnInterIfInitOnce <-------"; | ||
| end; | ||
| } |
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
| @@ -11,6 +11,7 @@ | ||
| enum E_CHARSERVER_ST | ||
| { | ||
| CHARSERVER_ST_RUNNING = CORE_ST_LAST, | ||
| CHARSERVER_ST_STARTING, | ||
| CHARSERVER_ST_SHUTDOWN, | ||
| CHARSERVER_ST_LAST | ||
| }; | ||
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
| @@ -11,6 +11,7 @@ | ||
| enum E_LOGINSERVER_ST | ||
| { | ||
| LOGINSERVER_ST_RUNNING = CORE_ST_LAST, | ||
| LOGINSERVER_ST_STARTING, | ||
| LOGINSERVER_ST_SHUTDOWN, | ||
| LOGINSERVER_ST_LAST | ||
| }; | ||
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.
4af3145There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[16:46:50] hello, another 2AM complaint from me
[16:46:56] 4af3145
[16:48:01] this committer thinks it's alright to 'check db' by doing a SELECT on all data in every table
[16:52:14] in addition, it's using Sql_Query, which uses mysql_store_result
[16:53:42] so not only is it pulling data from every table, it's also saying "and give it to me all at once"
[16:55:59] this will cause major mysql buffer pool thrashing as it tries read all the blocks from disk, it will also cause a major memory usage spike, since this production db is over 5 gigabytes large...
Can we do something to streamline this?
4af3145There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add
LIMIT 1:P