In cases where chains of empty relations existed, for example r1 -> r2 -> r3... -> rX, it was possible that TypeDB did not correctly execute the automatic relation cleanup due to the order the relations happened to be traversed.
TypeDB now retries the commit-time cleanup of empty relations until there are no new deletions. We accept the higher runtime cost of this operation since 1) we expect the number of modified relations in a transaction to be relatively small (no more than thousands) 2) relation chains are relatively rare 3) relation chains that must clean up in dependent fashion are extremely rare.
Implementation
Add a loop that retries relation cleanup until no more relations are deleted.
Usage and product changes
In cases where chains of empty relations existed, for example
r1 -> r2 -> r3... -> rX
, it was possible that TypeDB did not correctly execute the automatic relation cleanup due to the order the relations happened to be traversed.TypeDB now retries the commit-time cleanup of empty relations until there are no new deletions. We accept the higher runtime cost of this operation since 1) we expect the number of modified relations in a transaction to be relatively small (no more than thousands) 2) relation chains are relatively rare 3) relation chains that must clean up in dependent fashion are extremely rare.
Implementation