Skip to content

Specification Compliance Review #69

@toddbaert

Description

@toddbaert

Specification Compliance Review

This SDK is in a pre-release state.
This issue tracks implemented features, as well as minor specification deviations.

Minor bugs

  • Evaluation blocked for ERROR and STALE providers
    When a provider is in ERROR or STALE state, the SDK returns the default value instead of calling the provider. The spec says only NOT_READY and FATAL should be blocked; ERROR/STALE providers should still be called since they may return cached values. (Req 1.7.6, Req 1.7.7)

  • Wrong error code for FATAL providers
    When a provider is FATAL, the SDK returns PROVIDER_NOT_READY as the error code. The spec says it must return PROVIDER_FATAL. (Req 1.7.7)

  • Provider exceptions crash the caller
    If a provider throws an exception during flag evaluation, it propagates to the application. The spec says the SDK must catch all exceptions and return the default value instead. (Req 1.4.10)

  • Race condition between status check and provider lookup
    The status is checked with one lock, then the provider is retrieved with a separate lock. Between these two operations, the provider could be swapped, so the status check could apply to a different provider than the one actually used.

  • Old provider not shut down when new provider fails to initialize
    When a new provider is set, the old one is removed from the map immediately. If the new provider's Init() fails, Shutdown() is never called on the old provider, leaking its resources. (Req 1.1.2.3, Req 2.5.1)

Not yet implemented

  • Hooks
  • Events
  • Detailed evaluation methods (GetBooleanDetails(), GetStringDetails()`, etc).
  • Tracking.
  • Transaction context (no idea what the standard implementation in C++ might be, if there is one).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions