[GameMode] Very Basic Script
#26

Quote:
Originally Posted by GTLS
View Post
D) What do you mean by race condition?
I will quote maddinat0r:

pawn Code:
/*  race condition check:
    player A connects -> SELECT query is fired -> this query takes very long
    while the query is still processing, player A with playerid 2 disconnects
    player B joins now with playerid 2 -> our laggy SELECT query is finally finished, but for the wrong player
    what do we do against it?
    we create a connection count for each playerid and increase it everytime the playerid connects or disconnects
    we also pass the current value of the connection count to our OnPlayerDataLoaded callback
    then we check if current connection count is the same as connection count we passed to the callback
    if yes, everything is okay, if not, we just kick the player
*/
Almost none of the released gamemodes check against it but it is quite important.

Quote:
Originally Posted by GTLS
View Post
Other changes have been done in gamemode and database. Files uploaded. Thanks..!
You forgot to add the index. Without an index, it does full table scan but with it it scans only 1 row. Thanks.
Reply


Messages In This Thread
Very Basic Script - by GTLS - 23.07.2019, 16:55
Re: Very Basic Script - by N4Sti - 23.07.2019, 17:22
Re: Very Basic Script - by ZigGamerx - 23.07.2019, 17:26
Re: Very Basic Script - by NeXTGoD - 23.07.2019, 18:04
Re: Very Basic Script - by GTLS - 24.07.2019, 04:06
Re: Very Basic Script - by ZigGamerx - 24.07.2019, 09:18
Re: Very Basic Script - by GTLS - 24.07.2019, 10:04
Re: Very Basic Script - by GeorgeMcReary - 24.07.2019, 10:20
Re: Very Basic Script - by Mobtiesgangsa - 24.07.2019, 19:59
Re: Very Basic Script - by Kane - 24.07.2019, 21:18
Re: Very Basic Script - by kukboy - 24.07.2019, 21:48
Re: Very Basic Script - by Josh_Main - 25.07.2019, 08:59
Re: Very Basic Script - by GTLS - 25.07.2019, 09:23
Re: Very Basic Script - by Huemerson - 25.07.2019, 12:49
Re: Very Basic Script - by sonn51280 - 25.07.2019, 13:10
Re: Very Basic Script - by ZigGamerx - 25.07.2019, 14:02
Re: Very Basic Script - by GTLS - 27.07.2019, 09:23
Re: Very Basic Script - by PhantomThief1412 - 04.08.2019, 14:36
Re: Very Basic Script - by ZigGamerx - 04.08.2019, 18:39
Re: Very Basic Script - by SiaReyes - 05.08.2019, 13:20
Re: Very Basic Script - by GeorgeMcReary - 05.08.2019, 16:09
Re: Very Basic Script - by GTLS - 05.08.2019, 16:27
Re: Very Basic Script - by SiaReyes - 05.08.2019, 16:35
Re: Very Basic Script - by Calisthenics - 05.08.2019, 17:16
Re: Very Basic Script - by GTLS - 06.08.2019, 06:59
Re: Very Basic Script - by Calisthenics - 06.08.2019, 08:04
Re: Very Basic Script - by GTLS - 06.08.2019, 08:58
Re: Very Basic Script - by Calisthenics - 06.08.2019, 11:59
Re: Very Basic Script - by GTLS - 07.08.2019, 16:47
Re: Very Basic Script - by Mugala - 08.08.2019, 23:21

Forum Jump:


Users browsing this thread: 1 Guest(s)