Uploaded image for project: 'Sentry'
  1. Sentry
  2. SENTRY-219

Sentry Cache Backend Provider initialization does not work as expected

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: None
    • Labels:
      None

      Description

      Currently, the usage is meant to be:

      1. Create a ProviderBackend
      2. Create a ProviderBackendContext and call setHandle()
      3. Call providerBackend.initialize(providerContext);
      4. Create a SimpleDbPolicyEngine and pass the "initialized()" provider backend.

      However, creating a SimpleDbPolicyEngine will creates a new ProviderBackendContext in the ctor and calls ProviderBackend.initialize() effectively wiping out the handle that was set previously. The workaround is to call initialize() on the ProviderBackend again, after creating the policy engine.
      Perhaps, initialize() can be a no-op if it has already been called?

        Attachments

        1. SENTRY-219.patch
          1 kB
          Lenni Kuff

          Activity

            People

            • Assignee:
              lskuff Lenni Kuff
              Reporter:
              lskuff Lenni Kuff
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: