Skip to content

chore: updates datasources to report recoverability in errors#208

Merged
tanderson-ld merged 4 commits intomainfrom
ta/unrecoverable-blacklisting-tweak
Dec 19, 2025
Merged

chore: updates datasources to report recoverability in errors#208
tanderson-ld merged 4 commits intomainfrom
ta/unrecoverable-blacklisting-tweak

Conversation

@tanderson-ld
Copy link
Contributor

@tanderson-ld tanderson-ld commented Dec 18, 2025

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions
    Didn't do yet, going to do as part of overall benchtesting before release.

Adds tracking of Recover-ability on data source ErrorInfo so that can be communicated outward by datasources. Then the FDv2 datasource can blacklist conditionally on the recover-ability of the error. This now allows data sources to report Off (intentional shutdown) without getting blacklisted.


Note

Add Recoverable to DataSourceStatus.ErrorInfo and propagate it across all data sources to drive Interrupted vs Off, conditional FDv2 blacklisting/fallback, and improved shutdown handling; update tests accordingly.

  • Interfaces
    • Add bool Recoverable to DataSourceStatus.ErrorInfo and include it in FromException/FromHttpError.
  • Data Sources
    • Polling/Streaming (FDv1 & FDv2):
      • Compute recoverability via HttpErrors.IsRecoverable and populate ErrorInfo (set Recoverable=true for InvalidData/StoreError).
      • Route status: Interrupted for recoverable, Off for unrecoverable; pass ErrorInfo to status updates.
      • Add Shutdown(ErrorInfo?) with atomic guard; update Dispose to call shutdown and avoid duplicate work; ensure Off status on shutdown.
      • For unrecoverable init errors, complete init with false.
    • FDv2:
      • Honor FDv1Fallback header; blacklist current synchronizer only when error is unrecoverable.
  • Tests
    • Update/extend tests to assert Recoverable semantics, FDv1Fallback, status transitions (Interrupted vs Off), init task results, and shutdown behavior; add waits for async status updates.

Written by Cursor Bugbot for commit c56e407. This will update automatically on new commits. Configure here.

@tanderson-ld tanderson-ld requested a review from a team as a code owner December 18, 2025 22:01
@tanderson-ld tanderson-ld changed the title Ta/unrecoverable blacklisting tweak chore: updates datasources to report recoverability in errors Dec 18, 2025
{
// if client is initializing, make it stop waiting
_initTask.SetResult(true);
_initTask.SetResult(false);
Copy link
Contributor Author

@tanderson-ld tanderson-ld Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Twas the night before bugmas

if (newError != null && !newError.Value.Recoverable)
{
_actionable.BlacklistCurrent();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now if a datasource decides to shutdown for a recoverable reason (who knows what that will be in the future), we don't blacklist too agressively.

Copy link
Member

@kinyoklion kinyoklion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer no data source updates triggered by dispose. But everything else looks good.

@tanderson-ld tanderson-ld merged commit 5fe3ca7 into main Dec 19, 2025
15 checks passed
@tanderson-ld tanderson-ld deleted the ta/unrecoverable-blacklisting-tweak branch December 19, 2025 17:56
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