Skip to content

Make Fast Fetch retry transient interruptions#59

Open
apple-ouyang wants to merge 1 commit into
vrtmrz:mainfrom
apple-ouyang:codex/fast-fetch-interruptions
Open

Make Fast Fetch retry transient interruptions#59
apple-ouyang wants to merge 1 commit into
vrtmrz:mainfrom
apple-ouyang:codex/fast-fetch-interruptions

Conversation

@apple-ouyang

Copy link
Copy Markdown
Contributor

Summary

Make Fast Fetch retry transient streaming interruptions from the latest persisted checkpoint.

Context

Follow-up issue: vrtmrz/obsidian-livesync#977

Changes

  • Retry Fast Fetch failures up to 4 times with 2s, 5s, 10s, and 20s delays.
  • Re-read the latest Fast Fetch checkpoint before each retry and continue from that sequence.
  • Treat only the plug-in's own target-sequence abort as successful completion.
  • Propagate external AbortErrors so the retry layer can handle transient network or platform interruptions.

Verification

Ran from the top-level plug-in repository:

  • npm test -- --config vitest.config.unit.ts src/serviceFeatures/redFlag.unit.spec.ts src/lib/src/pouchdb/StreamingFetch.unit.spec.ts src/lib/src/serviceModules/Rebuilder.unit.spec.ts
  • npm run tsc-check
  • npx eslint --no-warn-ignored src/serviceFeatures/redFlag.simpleFetch.ts src/serviceFeatures/redFlag.unit.spec.ts src/lib/src/pouchdb/StreamingFetch.ts src/lib/src/pouchdb/StreamingFetch.unit.spec.ts src/lib/src/serviceModules/Rebuilder.ts src/lib/src/serviceModules/Rebuilder.unit.spec.ts
  • npm run build

Fast Fetch could fail immediately when the streaming changes request was interrupted by a network change or platform abort.

This keeps the persisted checkpoint useful inside the same initialisation run by retrying from the latest saved sequence. It also stops treating external AbortError failures as successful target-sequence completion.
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.

1 participant