serverdb: missing support for multiple operations on same row
Closed this issue · 1 comments
flavio-fernandes commented
When a transaction has more than one operation that affects the same row of a table,
it should honor the intermediary state of the row, so it does not get lost in the process
of committing the transaction.
Please refer to this PR as a reference test that better explain the issue -- and fixes the issue. ;)
#233
flavio-fernandes commented
~/dev/libovsdb.git issue232 vagrant@devmaster
❯ make test
=== RUN TestMultipleOps
transact_test.go:222:
Error Trace: transact_test.go:222
Error: Not equal:
expected: ovsdb.TableUpdates{"Bridge":ovsdb.TableUpdate{"a7fdad81-9187-4a3c-a95e-585f9ebe9714":(*ovsdb.RowUpdate)(0xc00066b4f0)}}
actual : ovsdb.TableUpdates{"Bridge":ovsdb.TableUpdate{"a7fdad81-9187-4a3c-a95e-585f9ebe9714":(*ovsdb.RowUpdate)(0xc00066b140)}}
Diff:
--- Expected
+++ Actual
@@ -9,3 +9,3 @@
(string) (len=5) "ports": (ovsdb.OvsSet) {
- GoSet: ([]interface {}) (len=4) {
+ GoSet: ([]interface {}) (len=3) {
(ovsdb.UUID) {
@@ -15,5 +15,2 @@
GoUUID: (string) (len=6) "port10"
- },
- (ovsdb.UUID) {
- GoUUID: (string) (len=5) "portA"
},
Test: TestMultipleOps
--- FAIL: TestMultipleOps (0.01s)