Merge branch 'hhh5599'

This commit is contained in:
Galder Zamarreño 2010-10-19 09:33:55 +02:00
commit 1f012f8b36
1 changed files with 6 additions and 4 deletions

View File

@ -266,7 +266,7 @@ public class PutFromLoadValidator {
PendingPutMap pending = pendingPuts.get(key); PendingPutMap pending = pendingPuts.get(key);
if (pending != null) { if (pending != null) {
if (pending.size() == 0) { if (pending.size() == 0) {
pendingPuts.remove(key); pendingPuts.remove(key, pending);
} }
pending.releaseLock(); pending.releaseLock();
} }
@ -561,10 +561,12 @@ public class PutFromLoadValidator {
try { try {
PendingPut cleaned = map.remove(toClean.owner); PendingPut cleaned = map.remove(toClean.owner);
if (toClean.equals(cleaned) == false) { if (toClean.equals(cleaned) == false) {
if (cleaned != null) {
// Oops. Restore it. // Oops. Restore it.
map.put(cleaned); map.put(cleaned);
}
} else if (map.size() == 0) { } else if (map.size() == 0) {
pendingPuts.remove(toClean.key); pendingPuts.remove(toClean.key, map);
} }
} }
finally { finally {