Online delete atoms.
Fix an issue where deleting the existing atom during an add always provides null to the online termstore and this could lead to duplicated terms.
Now, the return value of the deleteAtom call is used to delete atoms in Online terms.
@@ -155,7 +155,7 @@ public abstract class OnlineInference extends InferenceApplication {
GroundAtom atom = null;
if (atomManager.getDatabase().hasAtom(action.getPredicate(), action.getArguments())) {
- deleteAtom(action.getPredicate(), action.getArguments());
+ atom = deleteAtom(action.getPredicate(), action.getArguments());
((OnlineTermStore)termStore).deleteLocalVariable(atom);
}
