Conversation
Reviewer's GuideThe PR removes redundant database row snapshots from optimized page-view loads, adds bounded and cancelable backpressure handling for paginated blob prefetches, and coordinates shared prefetch lifecycle state so overloads pause row loading with an explicit Retry path while preserving compatibility and complete seed-walk semantics. Sequence diagram for optimized database page loadingsequenceDiagram
participant ViewLoader
participant FetchDedup as FetchDeduplication
participant PageAPI as PageViewAPI
participant BlobPrefetch as BlobPrefetchPipeline
participant BlobAPI as DatabaseBlobAPI
ViewLoader->>FetchDedup: fetchPageCollab(workspaceId, viewId, { includeRows: false })
FetchDedup->>PageAPI: getPageCollab(..., { includeRows: false })
PageAPI-->>ViewLoader: encoded_collab + metadata + empty row_data
ViewLoader->>BlobPrefetch: prefetchDatabaseBlobDiff(workspaceId, databaseId)
BlobPrefetch->>BlobAPI: databaseBlobDiff(page cursor, RID)
BlobAPI-->>BlobPrefetch: paginated blob pages
BlobPrefetch-->>ViewLoader: complete seed set after terminal Ready page
Sequence diagram for database blob backpressure retrysequenceDiagram
participant Database
participant Prefetch as BlobPrefetch
participant API as DatabaseBlobAPI
participant Server
Database->>Prefetch: prefetchDatabaseBlobDiff(...)
Prefetch->>API: databaseBlobDiff(same cursor, RID, signal)
API->>Server: POST /database/{databaseId}/blob/diff
alt admission overload code 1079 or HTTP 429
Server-->>API: JSON application error + retry hint
API-->>Prefetch: APIError
loop at most 3 retries
Prefetch->>Prefetch: waitForDatabaseBlobRetry(backoff, signal)
Prefetch->>API: databaseBlobDiff(same cursor, RID, signal)
end
else terminal page succeeds
Server-->>API: binary protobuf page
API-->>Prefetch: decoded diff page
Prefetch-->>Database: commit staged pages and expose seeds
end
alt retries exhausted or cooldown exceeds 30 seconds
Prefetch-->>Database: rejection
Database-->>Database: keep seed gate closed and show Retry
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Opening a database fetched row snapshots in the page-view response even though the view loader only uses the page collab. Blob admission errors could also be decoded as protobuf failures and trigger individual row loads, amplifying server overload.
The view loader now requests
include_rows=falseand uses the existing paginated blob pipeline for rows. Blob requests recognize JSON application errors and retry admission overload with bounded, jittered backoff. When retries are exhausted, the database shows a Retry action and keeps row loading paused.This preserves the existing 256-item / 16 MiB blob pages and complete seed walk needed for filters, sorting, grouping, and counts. It does not introduce viewport-only row semantics.
Validation
pnpm type-checkpassed.git diff --checkpassed.Checklist
Feature preview: not included; validation above exercises transport behavior and the retry lifecycle.
Summary by Sourcery
Prevent duplicate database row loads and make blob prefetch resilient to admission backpressure.
Bug Fixes:
Enhancements:
Documentation:
Tests: