Repository navigation
RAD-17289 Add descriptor priority: keep one Android transmit slot for high priority - #59
Merged
Merged
Conversation
arnonate
force-pushed
the
arnonate/RAD-16862-priority-lane
branch
from
October 28, 2026 21:09
1b8bf64 to
364159e
Compare
arnonate
marked this pull request as ready for review
October 28, 2026 21:16
elliottkember
approved these changes
Oct 29, 2026
elliottkember
left a comment
There was a problem hiding this comment.
This sounds like a great idea and probably simpler than multiple queues!!
…rity Small requests waited for the same 4 transmit slots as file parts, so a session create could sit behind a large backlog. Normal requests now use at most 3 slots, and high-priority requests can use the fourth. iOS accepts the field and ignores it for now. RAD-16862 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
arnonate
force-pushed
the
arnonate/RAD-16862-priority-lane
branch
from
October 29, 2026 15:32
364159e to
b757def
Compare
Merged
arnonate
added a commit
that referenced
this pull request
Oct 29, 2026
Jira: [RAD-17288](https://openspaceai.atlassian.net/browse/RAD-17288), [RAD-17289](https://openspaceai.atlassian.net/browse/RAD-17289) Bumps the version to 11.1.0 and moves the Unreleased CHANGELOG entries for #58 and #59 under that version. Once merged, tag the squash commit `v11.1.0` so openspacelabs/diana#9633 can move off its preview branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) [RAD-17288]: https://openspaceai.atlassian.net/browse/RAD-17288?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [RAD-17289]: https://openspaceai.atlassian.net/browse/RAD-17289?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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.
Jira: RAD-17289, follow-up to RAD-16862
On Android, at most 4 requests transmit at once across the library. Small JSON requests wait for the same 4 slots as file parts, first come, first served. Each chunked upload can keep 3 parts waiting. So with a large backlog, a session's small create request can wait behind hundreds of parts. Support sees about 10 cases a month of captures whose session never reached the server. Some of those may be this.
This adds
priority: 'high' | 'normal'to the request descriptor. Normal requests now use at most 3 of the 4 slots. The fourth is kept for high-priority requests, which can also use any free slot.Before: a session create waits in line behind every file part ahead of it.
After: a high-priority request takes the reserved slot without waiting behind file parts. It can still wait when other high-priority requests hold every slot.
iOS accepts the field and ignores it for now. Its version needs a second background URLSession and is a separate change.
What to look at
TransferGateinUploadTransport.kt: a normal request takes a lane permit, then a slot. A high-priority request takes a slot only.Decisions and trade-offs
Test Plan
./gradlew :react-native-background-upload:testDebugUnitTest: 316 tests, 0 failures. New tests cover the 3-slot cap for normal requests, the reserved slot for a high-priority one, priority parsing, a re-enqueue that changes priority, and the flag reaching the transport.yarn typecheck,yarn test(192 pass) andyarn lint:cipass.🤖 Generated with Claude Code