Skip to content

Commit aa73bd9

Browse files
committed
docs: State that an override source's start is not intended to fail
A source logs and retries a failed load, and reports a configuration error from build. If start throws anyway, the SDK logs it, closes the source, removes its snapshot, and the client runs without overrides.
1 parent 840e42f commit aa73bd9

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎lib/sdk/server/src/main/java/com/launchdarkly/sdk/server/subsystems/OverrideSource.java‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ public interface OverrideSource extends Closeable {
3131
* failed load should leave the previously supplied layer untouched by not calling the sink.
3232
* <p>
3333
* The SDK calls this method at most once, before any call to {@link #close()}, while the client
34-
* is being constructed. An exception thrown from it does not prevent the client from starting: the
35-
* SDK logs the exception, closes the source, and the client runs without overrides. A source that
36-
* cannot load its data should log that and retry rather than throw, as the SDK's file-based source
37-
* does.
34+
* is being constructed. This method is not intended to fail. A source that cannot load its data
35+
* logs the failure and keeps retrying, as the SDK's file-based source does. A configuration error
36+
* belongs in the {@link ComponentConfigurer#build(ClientContext)} that builds the source, where it
37+
* is reported when the client is created. If this method does throw, the client still starts: the
38+
* SDK logs the exception, closes the source, removes any snapshot the source supplied, and the
39+
* client runs without overrides.
3840
*
3941
* @param sink receives override snapshots
4042
*/

0 commit comments

Comments
 (0)