Skip to content
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

Bug when defining a rule and undefining a type in the same transaction. #6994

Open
krishnangovindraj opened this issue Mar 1, 2024 · 0 comments
Milestone

Comments

@krishnangovindraj
Copy link
Member

Description

( Reported by @james-whiteside )
A null pointer exception is encountered in a schema transaction when 1. a rule is defined and 2. A type which is in the set of inferred types of some variable in the said rule is undefined.

Environment

  1. TypeDB distribution: Core
  2. TypeDB version: 2.26.6
  3. Environment: Mac
  4. Client and version: Any
  5. Other details:

Reproducible Steps

  1. Set up
    Define the schema (attached).

  2. Execute
    Execute the following queries in the same transaction. The bug is thrown when the transaction is committed.

define
rule transitive-location:
    when {
        (location: $parent-place, located: $child-place) isa locating;
        (location: $child-place, located: $x) isa locating;
    } then {
        (location: $parent-place, located: $x) isa locating;
    };

undefine
indirect-locating sub locating;
  1. Unexpected result
    A null pointer exception is thrown and the commit is aborted.

Expected result

Successfully commits the rule & undefines the type as would be if two separate transactions were used.

Additional information

TypeGraph::Statistics::outRelates(Stream<TypeVertex>) receives a null from the stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant