Repository navigation
K2GO-577 feat(share): move ZIMs with rsync, write in place and resume - #787
Merged
Merged
Conversation
The sender's close DELETE lost its token in the relay and got 401, so the share stayed open after Done.
… place A share session runs an rsync daemon module per ZIM (password = session token); the receiver pulls straight into place and resumes from kept bytes. No staging copy. conex-core 0.4.0.
…elay The receiver asks its box to pull a Share item the sender offers over rsync, relayed on the hotspot network, and reports progress to the sender. A box that cannot pull uses the HTTP fetch.
…partials per pull A stale module list could land last and keep a closed session's module serving.
Restart a dead share daemon on manifest or progress, anchor the pull rate after a resume, report done with real bytes, and send progress off the import thread.
In a pull the parent rsync is the generator and moves almost nothing, so a long single-file transfer looked stalled to the watchdog.
A pull orphaned by a core crash kept writing the partial, so a Retry could start a second writer on the same file.
A partial the user will not resume no longer holds the disk until the 48 h sweep. A drop or a Retry keeps it.
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.
What changes
POST /v1/import/itemwith asourcepulls the ZIM straight into place (rsync --inplace --append-verify), then renames it into the zims dir. A drop or a cancel keeps the bytes in/library/.conex-partial; a Retry resumes from them.POST /v1/share/<id>/progress). A box with an older core uses the HTTP fetch./v1relay forwardsX-Share-Token, so the sender's close works.Why
Steps to QA
/library/.conex-stagingholds a full copy during the transfer./opt/conex-coreuntil a rootfs ships it), the receiver runs this build. Share a ZIM, cut the link mid-transfer, tap Retry. The item resumes from the kept bytes, the md5 is equal on both phones, and/library/.conex-stagingstays empty.Verifications
Notes