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

In-Memory Server #116

Merged
merged 16 commits into from
Jun 9, 2021
Merged

In-Memory Server #116

merged 16 commits into from
Jun 9, 2021

Commits on Jun 7, 2021

  1. ovsdb: Add Evaluate function to Conditions

    This allows for a Condition to be evaluated based
    on two supplied values.
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    871e9cf View commit details
    Browse the repository at this point in the history
  2. ovsdb: Fix Mutation and Condition Marshalling

    The unmarshal methods didn't use pointer receivers
    
    Go case statements don't fallthrough
    
    While scalar values are easily type asserted when marshalled to an
    interface{} the same is not true for map, set and uuid types.
    We need to use reflect to determine the OVSDB type before storing
    as an interface{} value.
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    bc3d5e8 View commit details
    Browse the repository at this point in the history
  3. ovsdb: Fix ValidateMutation

    This was incorrectly disallowing mutations where a
    single string would be inserted in to a []string...
    or int, real etc...
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    2b8dadd View commit details
    Browse the repository at this point in the history
  4. ovsdb: Fix typo in MutationSubtract

    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    2e56979 View commit details
    Browse the repository at this point in the history
  5. ovsdb: Add String function for Condition

    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    068eb2b View commit details
    Browse the repository at this point in the history
  6. cache: Add Row Create, Update, Delete operations

    And rename Set to Create. This allows for a caller to
    Add/Update/Delete cached rows with the appropriate locking.
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    bafcd54 View commit details
    Browse the repository at this point in the history
  7. mapper: Add _uuid when calling NewRow

    To make this work, we add NamedUUID detection.
    A named UUID is considered a default value as it's yet to
    have been processed by the server.
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    bbcbf5a View commit details
    Browse the repository at this point in the history
  8. server: Initial Commit

    This adds an initial in-memory server implementation.
    It implements enough of the spec to be used for testing.
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    c51ffcb View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2021

  1. cache: Store Row Indexes

    This commit make a few changes to the cache.
    
    1. Deprecates the TableCache.Set API, instead only allowing data to be
    provided in a call to NewTableCache
    2. Disallow RowCache creation via API and instead init the cache based on
    the contents of the provided schema. This removes having calling code
    check for table existence
    3. Rename Row.Set to Row.Create and provide an additionally check the
    type of the provided Model matches the schema
    4. Cache row indexes for increased lookup speed
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    a99de20 View commit details
    Browse the repository at this point in the history
  2. server: Let cache handle index checking

    Since the TableCache already does this, we don't need to implement
    checks. Just check for errors on cache operations
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    678beab View commit details
    Browse the repository at this point in the history
  3. server: Use index-based lookups for conditions

    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    e3aaeb1 View commit details
    Browse the repository at this point in the history
  4. stress: Add support for multiple clients

    1. Rename ninserts to inserts
    2. Adds support for multiple clients in series/parallel
    3. Ensures that we wait for the event to be received in cache
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    ef78bf2 View commit details
    Browse the repository at this point in the history
  5. server: Don't use buffered channels

    This ensures minimal delay between sending a transact response and the
    update notification being sent via monitor
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    927c073 View commit details
    Browse the repository at this point in the history
  6. cache: Remove TableCache Lock

    This removes the lock on TableCache and instead achieves the same
    result by locking all of the RowCaches. This is possible because
    the map in the TableCache doesn't change after creation, only the
    contents of the RowCache.
    
    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    1afe91c View commit details
    Browse the repository at this point in the history
  7. server: Lock cache for transaction processing

    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    c8481d3 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2021

  1. server: Ensure mutate operations write back to db

    Signed-off-by: Dave Tucker <[email protected]>
    dave-tucker committed Jun 9, 2021
    Configuration menu
    Copy the full SHA
    0d7102e View commit details
    Browse the repository at this point in the history