feat(webapi): expose MMapEnabled preference (capability-gated) - #566
Merged
Conversation
Follow-up to amule-project#565: surface the memory-mapped file I/O preference on the REST API. files.mmap_supported is a read-only daemon capability (mirrors upnp_available), read from the EC_TAG_FILES_MMAP_SUPPORTED tag; files.mmap_enabled is the runtime value. A PATCH that sets mmap_enabled is rejected with 409 when the connected daemon lacks mmap support, so the option is only writable against a core that can actually use it. Updates docs/api/REFERENCE.md and the 15-preferences-patch curl smoke (round-trip on a mmap-capable daemon; the 409 capability gate otherwise).
Member
|
WebUI implemented in #595 |
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.
Follow-up to #565 — surfaces the runtime memory-mapped file I/O preference on the REST API.
files.mmap_supported— read-only daemon capability (mirrorsconnection.upnp_available), read from theEC_TAG_FILES_MMAP_SUPPORTEDtag the core advertises only when built with mmap support. Ignored if sent on PATCH.files.mmap_enabled— the runtime value. A PATCH that sets it is rejected with 409conflictwhenfiles.mmap_supportedisfalse, so the option is only writable against a core that can actually use it (Windows /-DENABLE_MMAP=OFFdaemons reject it rather than silently dropping the tag).mmap covers all buffered block I/O — download writes to part files, upload reads of both shared (completed) and partial files, and hashing — so it's not limited to incomplete files.
Docs (
docs/api/REFERENCE.md) and the15-preferences-patchcurl smoke updated — the test adapts to the daemon: round-trip on a mmap-capable core, the 409 gate otherwise.