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

kvs: fix logic issue in lookupat #1297

Closed
chu11 opened this issue Dec 4, 2017 · 0 comments
Closed

kvs: fix logic issue in lookupat #1297

chu11 opened this issue Dec 4, 2017 · 0 comments
Assignees

Comments

@chu11
Copy link
Member

chu11 commented Dec 4, 2017

Was talking to @garlick and he was wondering why in lookup_create() there is a root_dir and a root_ref argument.

lookup_t *lookup_create (struct cache *cache,
                         int current_epoch,
                         const char *root_dir,
                         const char *root_ref,
                         const char *path,
                         flux_t *h,
                         int flags);

I remembered it was for a specific corner case where the user passes in a at-reference via lookupat and the user specifies as key of .. The current code returns the "real root reference" as a response. It should instead return the at-reference.

As a consequence of this fix, we can eliminate one of the above arguments in lookup.

@chu11 chu11 self-assigned this Dec 7, 2017
chu11 added a commit to chu11/flux-core that referenced this issue Dec 7, 2017
Remove root_dir parameter to lookup_create().  It was only used
for one corner case, which in reality is not needed.

Instead, when user passes in root dir path (i.e. "."), it will return
the root reference that was passed in by the user.  It does not need
to return the "real" root reference.

Update unit tests appropriately.

Fixes flux-framework#1297
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant