Skip to content

Commit a71f84b

Browse files
Neil DEVASNeil DEVAS
authored andcommitted
fix delete maybe
1 parent ce1f0d0 commit a71f84b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/java/group25/Server/Common/AbstractRMHashMapManager.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ public void updateThenPersistGlobalState(int xid) {
141141
RMHashMap m_data = getTransactionState(xid);
142142
if (m_data == null) return;
143143

144+
for (String i : globalState.keySet()) {
145+
if (!m_data.containsKey(i)) {
146+
globalState.remove(i);
147+
}
148+
}
144149
for (String i : m_data.keySet()) {
145150
globalState.put(i, m_data.get(i));
146151
}

0 commit comments

Comments
 (0)