Repository navigation
K2GO-507 feat(contentexchange): export via prepare/poll/fetch long op - #692
Merged
Merged
Conversation
Replace the single blocking export-item request (20 s read timeout) with a long operation: prepare, poll status, fetch. A large staged item (a multi-GB Kolibri channel) no longer times out because the poll is the liveness signal and the fetch uses a per-read stall timeout, not a wall clock. The per-item progress bar becomes two-phase (prepare 0..50 from stagedBytes, write 50..100 from copiedBytes). Cancel aborts the in-flight op; a swept op (status 404) re-prepares once; transient status blips are tolerated before an item fails.
…tage() exit stage() now owns the box op until it hands a ready one to the fetch: a finally aborts the current op on cancel, box error, poll-budget exhaustion or worker interrupt, so a live multi-GB stage is not left running until the box TTL sweep.
Migrate k2go_cx_export_item_preparing_fmt ("Preparing %1$s...") and the
leftover k2go_cx_export_category_fmt ("%1$s: %2$d%%") from the WIP tracker
into strings.xml with all 33 locale values (machine, flagged for review;
the category label is format-only, so the copies are identical). Clears
both from strings_untranslated.xml.
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.
Follows the cx-core export long operation (K2GO-507). Replaces the single blocking
GET /v1/export/item with prepare -> poll status -> fetch, so a large Kolibri channel
that the box stages before streaming no longer times out.
prepare half of the per-item bar and is the liveness signal (no wall-clock
timeout). It tolerates transient poll blips and re-prepares once on a swept op.
the op on any abnormal exit, so an abandoned stage does not keep running on the
box until the TTL sweep.
clock, so a multi-GB stream is fine as long as bytes keep flowing.
copied bytes.
UI changes:
shown during the staging half of the bar. Light and dark verified on the on-device
export run.