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

feat: Implement EventCacheStoreLock::lock() with poison error, and ::lock_unchecked #4285

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Commits on Nov 18, 2024

  1. feat: Event cache lock has a _generation_ value.

    This patch introduces the _generation_ value for the event cache lock:
    every time the lock is acquired by a new holder, the generation is
    incremented by 1. This is fundamental to know if the lock has been
    poisoned or not.
    Hywan committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    b06dac3 View commit details
    Browse the repository at this point in the history
  2. refactor: Rename EventCacheStoreLock::lock to lock_unchecked.

    We are about to introduce a lock which checks if it's been poisoned. To
    not break the current API semantics, `lock` is renamed `lock_unchecked`
    if poisoning isn't check/doesn't raise an error.
    Hywan committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    dc31f93 View commit details
    Browse the repository at this point in the history
  3. feat(common): Implement BackingStore for all Arc<T> where `T: Bac…

    …kingStore`.
    
    This patch implements `BackingStore` for all `Arc<T>` where `T:
    BackingStore`.
    Hywan committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    d4e69a3 View commit details
    Browse the repository at this point in the history
  4. feat(base): Implement LockableEventCacheStore::is_poisoned.

    This patch implements `LockableEventCacheStore:is_poisoned` to know
    whether the lock has been poisoned or not.
    Hywan committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    eff9827 View commit details
    Browse the repository at this point in the history
  5. feat(base): Implement EventCacheStoreLock::lock.

    This patch implements `EventCacheStoreLock::lock`, which is similar
    to `lock_unchecked` but it returns a `Result<EventCacheStoreLockGuard,
    EventCacheStoreLockPoisonError<…>>` to handle the _poisoned_ case.
    Hywan committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    fa18ed4 View commit details
    Browse the repository at this point in the history
  6. test(base): Add logged_in_base_client_with_store_config.

    This patch adds a small `logged_in_base_client_with_store_config`
    function similarly to `logged_in_base_client`, but… with… a store
    config!
    Hywan committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    4ace281 View commit details
    Browse the repository at this point in the history
  7. test(base): Add tests for EventCacheStoreLock::lock_*.

    This patch adds tests for `EventCacheStoreLock::lock` and
    `lock_unchecked`.
    Hywan committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    5073cd1 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2024

  1. Configuration menu
    Copy the full SHA
    cd4c12e View commit details
    Browse the repository at this point in the history