ThreadTracker + Attempt on NPC Disappearing fix

Engineered the ThreadTracker: server-embedded deadlock auditing tool, which will print error messages in case of found deadlocks (also showing all in-use locks on the time of the issue).
Changed the player's id on DB now starting from 20mil, thus preventing players from overwriting NPC/mobs with same oid in-game. Requires proper testing to see if the issue has been cleared.
This commit is contained in:
ronancpl
2017-11-16 12:22:32 -02:00
parent aecc3e300a
commit 2b38b62683
50 changed files with 1099 additions and 123 deletions

View File

@@ -53,7 +53,8 @@ import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import tools.locks.MonitoredEnums;
import tools.locks.MonitoredReentrantLock;
/**
*
@@ -74,8 +75,8 @@ public class EventManager {
private Integer readyId = 0;
private Properties props = new Properties();
private String name;
private Lock lobbyLock = new ReentrantLock();
private Lock queueLock = new ReentrantLock();
private Lock lobbyLock = new MonitoredReentrantLock(MonitoredEnums.EM_LOBBY);
private Lock queueLock = new MonitoredReentrantLock(MonitoredEnums.EM_QUEUE);
private static final int maxLobbys = 8; // an event manager holds up to this amount of concurrent lobbys