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 more oom() fixes #1128

Merged
merged 6 commits into from Jul 28, 2017
Merged

Commits on Jul 28, 2017

  1. modules/kvs: Add cache_entry_force_clear_dirty()

    Function is to be used in emergency error handling situations.
    
    Add unit tests appropriately.
    chu11 committed Jul 28, 2017
    Copy the full SHA
    1bd0d62 View commit details
    Browse the repository at this point in the history
  2. modules/kvs: Update fence_merge() to not oom()

    Removal of fence_merge() oom()'s required slight logic change. Previously
    fences were modified while iterating, so if an error occurred midway,
    there was no way to go back to the original point before the function was
    called.  The function now duplicates some json objects and ensures that
    everything succeeds before completing the merge.
    
    Update callers of fence_merge() appropriately.  Of note,
    commit_mgr_merge_ready_commits()'s internal algorithm is also changed, so
    that it no longer pops and pushes entries onto the list.  Only using
    list iterators, it manipulates ready commits.
    
    Update unit tests appropriately throughout.
    chu11 committed Jul 28, 2017
    Copy the full SHA
    46348f7 View commit details
    Browse the repository at this point in the history
  3. modules/kvs: Refactor content_load_completion()

    Split into synchronous content_load_get() call to allow errors
    to be passed back on synchronous calls, and content_load_completion()
    for asynchronous rpcs.
    
    After failed cache_lookup, need to choose an errno to indiciate
    missing cache entry, used errno = ENOTRECOVERABLE to represent this.
    chu11 committed Jul 28, 2017
    Copy the full SHA
    460dec7 View commit details
    Browse the repository at this point in the history
  4. modules/kvs: Remove oom() from wait_runqueue()

    Re-work wait_runqueue() to not oom() on error.  Algorithm within the
    function has been altered to be safe against errors which requires
    that all elements on the waitqueue be copied off or none.  This change
    effectively converts the function from having two loops to having
    three.
    
    Update callers to check for error.  Notably adjust cache_entry_set_dirty()
    and cache_entry_set_json() to return -1 on error, and update callers of
    these functions.
    
    In some locations, where an errno had to be set to indicate a missing
    cache entry, errno = ENOTRECOVERABLE was chosen.  In another location where
    a cache entry was missing data, errno = ENODATA was chosen.
    chu11 committed Jul 28, 2017
    Copy the full SHA
    da52343 View commit details
    Browse the repository at this point in the history
  5. modules/kvs: Fix assert usage

    Asserts should only perform sanity checks and not call any real code,
    b/c code within asserts can be removed during compilation.
    
    Fixes flux-framework#1130
    chu11 committed Jul 28, 2017
    Copy the full SHA
    9b81fd6 View commit details
    Browse the repository at this point in the history
  6. modules/kvs: Fix errno return in cleanup paths

    When cleaning up in a function, it is possible for an errno value to
    be cleared via functions called in the cleanup.  Save errno appropriately
    so that it is not lost before returning to caller.  Adjust code appropriately
    in some functions if not necessary to save errno.
    chu11 committed Jul 28, 2017
    Copy the full SHA
    b12f711 View commit details
    Browse the repository at this point in the history