-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement test server referential integrity #375
Commits on Jan 9, 2024
-
updates: fix merge resulting in empty optional values
An optional atomic value is cleared with an empty set instead of a nil set. Thus use an empty set as an original empty value so that when an op that sets a value is merged with an op that clears the value, the comparison with an empty orignal value results in a noop. Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e2463ab - Browse repository at this point
Copy the full SHA e2463abView commit details -
updates: clean up when merging results in noop
Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d03747f - Browse repository at this point
Copy the full SHA d03747fView commit details -
transaction: fix results on error
The number of results of a transaction should always have a minimum length of the number of operations passed to it even if there is an error. The recent introduction of the named UUID expansion in the transaction broke this requirement. Changed the error handling approach so that this is less likely to happen in the future. Also removed the panic when initializing the transaction cache. Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f6870ab - Browse repository at this point
Copy the full SHA f6870abView commit details -
The main purpose of this change is to have a package for common database types and interfaces that can be used throughout the project without incurring in circular dependencies. To that end, the in-memory database implementation is moved to its own subpackage. The transaction implementation is also moved to its own subpackage given that it can work with any database implementing the Database interface. At the interface level though it should be expected that a transaction implementation could have a more tighter underlying coupling with a database implementation. So it makes sense to introduce a transaction interface, and for transactions to be provided by database implementations rather than being built directly by the server. Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f3b4525 - Browse repository at this point
Copy the full SHA f3b4525View commit details -
Remove references from test schema
Once we introduce referential integrity, existing tests would start to fail as they are not accounting for it. So its better to remove the references from the test schema which is something that current tests are not leveraging, and then expand the schema with other references that the referenctial integrity tests would leverage. Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 68876d1 - Browse repository at this point
Copy the full SHA 68876d1View commit details -
Add the isRoot flag to the schema which will be used for referential integrity Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a6812b2 - Browse repository at this point
Copy the full SHA a6812b2View commit details -
server: implement referential integrity
Implement referential integrity and garbage collection as described in RFC7047. This is achieved keeping track of inverse references. A reference tracker is used in the transaction to keep these references updated, to check for referential integrity related violations and to add additional updates to the transaction resulting from reference garbage collection. The inverse references are stored in the database on commit. The updates resulting from reference garbage collection are also sent to any monitoring clients as expected. Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e1d2cd1 - Browse repository at this point
Copy the full SHA e1d2cd1View commit details -
Add referential integrity transaction tests
Provides coverage for the interaction of reference garbage collection with index constraint checks. Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1c3007d - Browse repository at this point
Copy the full SHA 1c3007dView commit details -
Add referential integrity integration tests
While these tests could have been purely server tests, setting them up as integration tests against both the test server and the real OVSDB server allows us to contrast the implemented behavior. Also provides coverage for how the references are updated in the database as well as for how referential integrity updates are sent back to the client. Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 09997db - Browse repository at this point
Copy the full SHA 09997dbView commit details
Commits on Jan 15, 2024
-
Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f5a6d80 - Browse repository at this point
Copy the full SHA f5a6d80View commit details
Commits on Jan 23, 2024
-
Improve schema isRoot compat check
Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7432056 - Browse repository at this point
Copy the full SHA 7432056View commit details -
Fix reference test schema indentation
Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bb2f6df - Browse repository at this point
Copy the full SHA bb2f6dfView commit details -
references: avoid using reflect when comparing GoUUID
Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 690361f - Browse repository at this point
Copy the full SHA 690361fView commit details