typedb
typedb copied to clipboard
Deleted and renamed rules remain unchanged in the LogicCache until commit
Description
When we delete or change a Rule
using delete()
or setLabel()
method and then use LogicManager::getRule()
, it returns the unchanged rule from the LogicCache
. Cache is reindexed only on commit.
Environment
- OS (where TypeDB server runs): Mac OS 13.2
- TypeDB version (and platform): TypeDB 2.17.0
- TypeDB client: client-rust
Reproducible Steps
Steps to create the smallest reproducible scenario:
- Create a correct schema with a rule.
- Delete rule using
Rule::delete()
. - Get rule by label using
LogicManager
.
Expected Output
No existing rule.
Actual Output
Rule that was already deleted.
Additional information
We hadn't test scenarios in BDD for rule deleting and renaming. Tests are implemented in this PR: https://github.com/vaticle/typedb-behaviour/pull/250, and corresponding steps have to be implemented in the typedb-core
and all clients.
Current version of these tests contains commit steps and should pass without changes in typedb-core
. After fixing this issue two additional scenarios should be re-enabled.