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

add KVS checkpoints #2783

Merged
merged 8 commits into from Mar 7, 2020
Merged

Commits on Mar 6, 2020

  1. content-sqlite: drop unused dump prepared stmt

    Problem: The 'sql_dump' prepared statement is unused,
    left over from code removed in flux-framework#2786.
    
    Remove unused prepared statement.
    garlick committed Mar 6, 2020
    Copy the full SHA
    1ef979b View commit details
    Browse the repository at this point in the history
  2. broker: drop persist-directory, persist-filesystem

    Drop code that validates a 'persist-directory' attribute,
    if set, or that sets 'persist-directory' to a unique
    directory in 'persist-filesystem', if set.
    
    Drop code that sets the broker 'log-filename' attribute
    to a location in 'persist-directory', if the former is
    unset and the latter is set.
    
    Drop code from rc3 that attempts to write out a
    KVS snapshot if 'persist-directory', if set.
    
    Drop relevant sharness tests from t0001-basic.t.
    Drop all tests from t2010-kvs-snapshot-restore.t for now.
    Drop these attributes from flux-broker-attributes(7) man page.
    garlick committed Mar 6, 2020
    Copy the full SHA
    21ffb63 View commit details
    Browse the repository at this point in the history
  3. content-sqlite: handle content.backing-path attr

    Drop the code that manipulates the location and persistence
    of the sqlite db file based on the 'persist-directory'
    attribute, and replace it with the following:
    
    If 'content.backing-path' attribute is set on entry,
    use its value as the sqlite db file.  sqlite creates
    this file if it doesn't exist.  On exit, it is preserved.
    
    If 'content.backing-path' is not set on entry, use
    '${rundir}/content.sqlite' as the sqlite db file.
    sqlite creates this file if it doesn't exist(*).
    On exit it is removed.  Set the 'content.backing-path'
    attribte so the location of this file.
    
    Add a 'flux content flush' command to rc3 just before
    content-sqlite unload, to ensure that any dirty cache
    entries are flushed to the backing store before content-sqlite
    is unloaded.
    
    _______
    (*) This file is not expected to exist initially given that
    rundir is a temporary directory, but it _could_ exit if the
    content-sqlite module is reloaded.  Reusing its content
    is appropriate in that case.
    garlick committed Mar 6, 2020
    Copy the full SHA
    a274ceb View commit details
    Browse the repository at this point in the history
  4. modules/content-sqlite: add kvs-checkpoint side service

    Add a new sqlite table to store KVS checkpoint data,
    and offer a new service, 'kvs-checkpoint', with get/put
    methods.  The table has the following properties:
    - keys and values are strings of any length
    - keys are unique
    - empty string key is not allowed
    - put to existing key replaces value
    
    Note:  piggybacking this service/table onto content-sqlite is
    a temporary short cut to get something working quickly.
    It should probably be split out to its own module eventually,
    as implementing it here will make it cumbersome to replace the
    content backing module.
    garlick committed Mar 6, 2020
    Copy the full SHA
    4a68e3d View commit details
    Browse the repository at this point in the history
  5. modules/kvs: save/restore checkpoint for primary ns

    On rank 0 startup, try to get a 'kvs-primary' key from the
    kvs-checkpoint service.  If the service is available and the
    key is found, use it as the blobref for the initial KVS root.
    If unavailable or not found, start with an empty directory as
    before.
    
    On rank 0 unload, try to put 'kvs-primary' to the kvs-checkpoint
    service.  If the service is unavailable, don't treat this as
    an error, since the instance may be purposefully running without one.
    garlick committed Mar 6, 2020
    Copy the full SHA
    6694c96 View commit details
    Browse the repository at this point in the history
  6. testsuite: add kvs/checkpoint test program

    Add a test program for exercising kvs-snapshot.get
    and kvs-snapshot.put service.
    garlick committed Mar 6, 2020
    Copy the full SHA
    d28bde7 View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    d95eb5e View commit details
    Browse the repository at this point in the history
  8. doc/flux-broker-attributes(7): add backing-path

    Describe the new content.backing-path attribute.
    garlick committed Mar 6, 2020
    Copy the full SHA
    558d46f View commit details
    Browse the repository at this point in the history