commit | e86bbfc2775b20592da7ef6a7646540eeaeca448 | [log] [tgz] |
---|---|---|
author | Pavlin Radoslavov <pavlin@onlab.us> | Tue Nov 05 08:32:14 2013 -0800 |
committer | Pavlin Radoslavov <pavlin@onlab.us> | Tue Nov 05 08:32:14 2013 -0800 |
tree | 595dd8945d1f0b101ec6216e040f426823faaf82 | |
parent | 823f322b6ef408b0cd8f9b57f3d4b031c4b34a88 [diff] [blame] |
Moved op.commit() call where it is actually needed: only if there is a change to the database.
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java b/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java index 65c7ec5..904a351 100644 --- a/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java +++ b/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java
@@ -232,8 +232,8 @@ log.info("SwitchStorage:updatePort dpid:{} port:{}", dpid, portNum); if (p != null) { setPortStateImpl(p, state, desc); + op.commit(); } - op.commit(); success = true; } else { log.error("SwitchStorage:updatePort dpid:{} port:{} : failed switch does not exist", dpid, portNum);