Skip to content

Config service fixes & improvements#105

Merged
adams85 merged 15 commits intomasterfrom
configservice-fixes
May 28, 2025
Merged

Config service fixes & improvements#105
adams85 merged 15 commits intomasterfrom
configservice-fixes

Conversation

@adams85
Copy link
Contributor

@adams85 adams85 commented Apr 25, 2025

Describe the purpose of your pull request

This PR makes some corrections and improvements around config services:

  • Use monitonic clock (Stopwatch.GetTimestamp) instead of system clock (DateTime.UtcNow) for scheduling poll iterations in Auto Polling mode for improved precision and resistance to system clock adjustments (time sync, daylight saving, user initiated clock adjustments, etc.)
  • Correct the local cache refresh behavior in offline mode: if the client uses an external cache, a synchronization should happen in every case where a fetch operation would happen in online mode. For example, in Auto Polling mode, the background polling loop should sync with the external cache even when it doesn't initiate config fetch operations.
  • Change forceRefreshAsync to report failure and log a warning in offline mode only when the client is not configured to use an external cache. (Low impact behavioral BC.)
  • Make the ClientReady event consistent with other SDKs in Auto Polling mode. When the client is offline, ClientReady is emitted as soon as the initial sync with the external cache completes. (Low impact behavioral BC.)
  • Correct the intellisense docs for the ClientReady event and the WaitForReadyAsync method as the previous description was misleading.
  • Eliminate possible race condition between initial and user-initiated cache synchronization (on asynchronous code path only).
  • Make changes to also emit the ConfigChanged event when the local cache is updated as a result of synchronization with the external cache. (Low impact behavioral BC.)
  • Raise configChanged once per config refresh operation, eliminate race conditions around cache write, and improve performance in high concurrency situations by deduplicating config refresh instead of config fetch operation only.
  • Fix bug in HttpClientConfigFetcher (The W/ prefix should not be stripped from the received ETag because other SDKs don't do that).

Related issues (only if applicable)

https://trello.com/c/XZdBOLY1
https://trello.com/c/mU63054x

How to test? (only if applicable)

n/a

Security (only if applicable)

n/a

Requirement checklist (only if applicable)

  • I have covered the applied changes with automated tests.
  • I have executed the full automated test set against my changes.
  • I have validated my changes against all supported platform versions.
  • I have read and accepted the contribution agreement.

@adams85 adams85 requested a review from a team as a code owner April 25, 2025 19:21
@adams85 adams85 changed the title Configservice fixes Config service fixes & improvements Apr 25, 2025
@adams85 adams85 force-pushed the configservice-fixes branch 3 times, most recently from e12b22c to 6e294e5 Compare May 2, 2025 18:07
@adams85 adams85 marked this pull request as draft May 2, 2025 18:08
@adams85 adams85 force-pushed the configservice-fixes branch 4 times, most recently from 69a0883 to 468a5ff Compare May 5, 2025 17:06
@adams85 adams85 force-pushed the configservice-fixes branch 2 times, most recently from d75f2f4 to 9a7ac8f Compare May 17, 2025 15:34
@adams85 adams85 force-pushed the configservice-fixes branch 3 times, most recently from dbffbb1 to 6c4eb33 Compare May 17, 2025 20:22
@adams85 adams85 force-pushed the configservice-fixes branch from 6c4eb33 to 4e772ad Compare May 17, 2025 20:35
@adams85 adams85 marked this pull request as ready for review May 17, 2025 20:59
@sonarqubecloud
Copy link

@adams85 adams85 merged commit 0e0870f into master May 28, 2025
17 checks passed
@adams85 adams85 deleted the configservice-fixes branch May 28, 2025 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants