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:
@@ -27,9 +27,11 @@ import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import tools.locks.MonitoredReentrantLock;
|
||||
import tools.DatabaseConnection;
|
||||
import tools.Pair;
|
||||
import tools.locks.MonitoredEnums;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -45,7 +47,7 @@ public enum ItemFactory {
|
||||
MERCHANT(6, false);
|
||||
private final int value;
|
||||
private final boolean account;
|
||||
private static final ReentrantLock lock = new ReentrantLock(true);
|
||||
private static final Lock lock = new MonitoredReentrantLock(MonitoredEnums.ITEM, true);
|
||||
|
||||
private ItemFactory(int value, boolean account) {
|
||||
this.value = value;
|
||||
|
||||
Reference in New Issue
Block a user