-
Notifications
You must be signed in to change notification settings - Fork 0
fix(mount): fall back when GitHub tar seed fails #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6565,9 +6565,14 @@ func (s *Syncer) pullRemoteFull(ctx context.Context, conflicted map[string]struc | |
| if client, ok := s.client.(githubWorkingTreeTarClient); ok { | ||
| used, err := s.pullRemoteFullGithubTarSeed(ctx, client, conflicted, prog) | ||
| if used { | ||
| return err | ||
| if err == nil { | ||
| return nil | ||
| } | ||
| s.logf("github tar seed failed; falling back to resumable tree pull: %v", err) | ||
| seedErr = err | ||
|
Comment on lines
+6571
to
+6572
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When an already-bootstrapped GitHub mount performs a periodic or forced full pull, this branch claims to fall back to the resumable tree, but Useful? React with 👍 / 👎. |
||
| } else { | ||
| seedErr = err | ||
|
Comment on lines
+6571
to
+6574
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Completed mounts miss tree fallback With Learn moreA completed mount normally tries the generic snapshot export before the resumable tree traversal. The new tar failure path rejoins that sequence instead of selecting the promised tree fallback. pullRemoteFullExport returns Example: A periodic full pull gets HTTP 500 from the GitHub tar export and HTTP 500 from the generic export endpoint, while Recommended fix: When Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| } | ||
| seedErr = err | ||
| } | ||
| if !s.state.BootstrapComplete { | ||
| s.logf("skipping atomic export for initial bootstrap; using bounded resumable tree pull") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Slow tar seeds defeat fallback
When the tar request exhausts the bootstrap watchdog,
errarrives afterctxis canceled.pullRemoteFullTreereuses that context and fails immediately, so slow tar seeds still block initial materialization.Learn more
The tar export is one atomic HTTP request with no progress callbacks. The bootstrap watchdog cancels its context when that request remains idle too long. The new fallback starts only after the tar call returns, but it passes the same canceled context to
pullRemoteFullTree. Every tree request then fails without making progress, and the next reconcile repeats the tar attempt.Example: A tar export stalls until the two-minute bootstrap watchdog cancels
ctx. The export returnscontext deadline exceeded; fallback callsListTreewith that canceled context and fails immediately. The next initial-sync cycle starts the same sequence instead of hydrating through the tree API.Recommended fix: Give
ExportGithubWorkingTreeTarits own sub-deadline strictly below the active bootstrap watchdog, as pullRemoteFullExport does. Fall back only while the parent bootstrap context remains live; propagate parent cancellation directly.Was this helpful? React with 👍 or 👎 to provide feedback.