-
Notifications
You must be signed in to change notification settings - Fork 0
Description
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 inERRORorSTALEstate, the SDK returns the default value instead of calling the provider. The spec says onlyNOT_READYandFATALshould be blocked;ERROR/STALEproviders 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 isFATAL, the SDK returnsPROVIDER_NOT_READYas the error code. The spec says it must returnPROVIDER_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'sInit()fails,Shutdown()is never called on the old provider, leaking its resources. (Req 1.1.2.3, Req 2.5.1)