ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From styriver <Scott_Tyri...@mgic.com>
Subject Locking behavior
Date Mon, 16 Jan 2017 22:44:29 GMT
I have two questions about locking. 

1) Is it expected behavior that if an application fails to call an unlock it
locks the entire cache and not just that object? 

We have a web application that had a bug where unlock was not being called.
But the behavior that we experienced is that this affected all users. All
users were "hung" until we restarted both server nodes to free the lock. The
cache in question uses the userid as a key. So it appears we lock the entire
cache not just a particular map entry. When we ask for the lock we are
asking based on the map key?

      Lock lock = getCache().lock(userId);

      try {
         if (getCache().containsKey(userId)) {
            lockedObj = new LockedObj(lock, getCache().get(userId));
            //acquire lock

2) Is there a way to "force" an unlock in the event. The only way I could
figure out to resolve the issues was to take down both server nodes that
hold the cache and restart them.

View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Locking-behavior-tp10087.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message