From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id D3AD41FF13E for ; Fri, 06 Feb 2026 10:00:30 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 90EBE2193E; Fri, 6 Feb 2026 10:01:04 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 06 Feb 2026 10:00:59 +0100 Message-Id: Subject: Re: [PATCH datacenter-manager 4/5] parallel fetcher: improve result type ergonomics From: "Lukas Wagner" To: "Thomas Lamprecht" , X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20260204152723.482258-1-l.wagner@proxmox.com> <20260204152723.482258-5-l.wagner@proxmox.com> <894ed689-9f65-4ff2-8a4d-6419bdc566c9@proxmox.com> In-Reply-To: <894ed689-9f65-4ff2-8a4d-6419bdc566c9@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1770368381169 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.036 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: XD7JMGP5FZB4UMUAKQUCG6667PQ5WNY5 X-Message-ID-Hash: XD7JMGP5FZB4UMUAKQUCG6667PQ5WNY5 X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu Feb 5, 2026 at 7:17 PM CET, Thomas Lamprecht wrote: > Am 04.02.26 um 16:27 schrieb Lukas Wagner: >> Completely overhaul the *Result types: >> - use the term 'Outcome' instead of result, to avoid confusion with >> Rust's Result type > > I do not want to bikeshed this to much, but if we touch it then a bit > might be ok, with that in mind: why not Response? Outcome just has a bit > to abstract ring to me. No particular reason and a very sensible suggestion, after giving it some thought and seeing the suggested names in context, I also prefer it to *Outcome -- will send a v2 for the last two patches with the names changed accordingly. Thanks! > > Rest seems OK to me, albeit I only skimmed the changes. The module level > docs are highly appreciated, but won't apply them until above is cleared > up. > >> - use generics to avoid the awkwardness of accessing the node outcome >> of a single node when using do_for_all_remotes (we only call out to >> a single node anyways) >> - implement .iter()/.into_iter() where it makes sense for conveniently >> iterating over remote outcomes and node outcomes >> - make all members private and offer getters to access fields >> - use a sorted vec as an internal data structure for storing >> remote outcomes instead a hash map. This avoids the awkwardness of >> having the remote name as key *and* in the struct that is used as a >> value. Since the vec is sorted by the remote name, we still can >> access specific remotes quite effectively via binary search.