mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
[Crash] Fix world crash in player event processing (#2960)
* [Crash] Fix world crash in player event processing * Add rule BatchPlayerEventProcessChunkSize
This commit is contained in:
parent
4a8222f243
commit
9f42da5bad
@ -139,6 +139,10 @@ void PlayerEventLogs::AddToQueue(const PlayerEventLogsRepository::PlayerEventLog
|
|||||||
m_batch_queue_lock.lock();
|
m_batch_queue_lock.lock();
|
||||||
m_record_batch_queue.emplace_back(log);
|
m_record_batch_queue.emplace_back(log);
|
||||||
m_batch_queue_lock.unlock();
|
m_batch_queue_lock.unlock();
|
||||||
|
|
||||||
|
if (m_record_batch_queue.size() >= RuleI(Logging, BatchPlayerEventProcessChunkSize)) {
|
||||||
|
ProcessBatchQueue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fills common event data in the SendEvent function
|
// fills common event data in the SendEvent function
|
||||||
|
|||||||
@ -783,6 +783,7 @@ RULE_BOOL(Logging, PrintFileFunctionAndLine, false, "Ex: [World Server] [net.cpp
|
|||||||
RULE_BOOL(Logging, WorldGMSayLogging, true, "Relay worldserver logging to zone processes via GM say output")
|
RULE_BOOL(Logging, WorldGMSayLogging, true, "Relay worldserver logging to zone processes via GM say output")
|
||||||
RULE_BOOL(Logging, PlayerEventsQSProcess, false, "Have query server process player events instead of world. Useful when wanting to use a dedicated server and database for processing player events on separate disk")
|
RULE_BOOL(Logging, PlayerEventsQSProcess, false, "Have query server process player events instead of world. Useful when wanting to use a dedicated server and database for processing player events on separate disk")
|
||||||
RULE_INT(Logging, BatchPlayerEventProcessIntervalSeconds, 5, "This is the interval in which player events are processed in world or qs")
|
RULE_INT(Logging, BatchPlayerEventProcessIntervalSeconds, 5, "This is the interval in which player events are processed in world or qs")
|
||||||
|
RULE_INT(Logging, BatchPlayerEventProcessChunkSize, 10000, "This is the cap of events that can be inserted into the queue before a force flush. This is to keep from hitting MySQL max_allowed_packet and killing the connection")
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(HotReload)
|
RULE_CATEGORY(HotReload)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user