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

Recursive query on a mount from parent of mountpoint produces incorrect results #677

Open
SanderMertens opened this issue Apr 17, 2018 · 0 comments
Labels

Comments

@SanderMertens
Copy link
Member

SanderMertens commented Apr 17, 2018

Recursive queries do not produce correct results when the result includes objects from a mount that is mounted on a child of the from clause. The following code demonstrates the scenario:

corto_mount m = corto_subscribe("//")
    .from("/data/mounted")
    .mount(corto_mount_o, NULL, NULL);

corto_select("//").from("/data").iter(&it)

The mount is matched when corto_select evaluates /data. When computing the relative mount query from /data and /data/mounted, the resulting from is set to ., which is correct. However, when a mount then returns an object with, for example, id x, this id is then added to the corto_select location as /data/x and not /data/mounted/x.

When computing the next mount query, the relative parent from /data/x and /data/mounted will still evaluate to ., which results in the exact same query being made to the mount. This process will repeat a few times which eventually yields undefined results.

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

No branches or pull requests

1 participant