From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 867B51FF137 for ; Tue, 31 Mar 2026 11:26:34 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BE86A15B1D; Tue, 31 Mar 2026 11:27:01 +0200 (CEST) Message-ID: Date: Tue, 31 Mar 2026 11:26:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH proxmox v6 02/12] s3-client: add persistent shared request counters for client To: Christian Ebner , pbs-devel@lists.proxmox.com References: <20260319094100.240765-1-c.ebner@proxmox.com> <20260319094100.240765-3-c.ebner@proxmox.com> Content-Language: en-US From: Hannes Laimer In-Reply-To: <20260319094100.240765-3-c.ebner@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774949162485 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.419 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 1 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 1 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 1 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: FXXWQ6DZASUTCY62IJHAPWBUMIJ6GCRB X-Message-ID-Hash: FXXWQ6DZASUTCY62IJHAPWBUMIJ6GCRB X-MailFrom: h.laimer@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 Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 2026-03-19 10:41, Christian Ebner wrote: > Implements atomic counters for api requests successfully send to the > S3 API endpoint via the client, accounting for individual requests > discriminating based on their method. > > The counter mappings are conditionally constructed on client > instantiation by caller given configuration options. > > Since multiple client instances might exist, accessing the API > concurrently and possibly from different processes, provide the > atomic counters via shared memory mapping. This follows along the > lines of the shared traffic limiter implementation. To reduce cache > line contention, atomic counters are aligned to half the standard > cache line size of 64-bytes. > > Signed-off-by: Christian Ebner > --- [..] > +/// Options for the s3 client's shared request counters > +pub struct S3RequestCounterOptions { > + /// ID for the memory mapped file > + pub id: String, > + /// Base path for the shared memory mapped file > + pub base_path: PathBuf, > + /// User for the to be created shared memory mapped file and folders > + pub user: User, > +} > + > +/// Configuration for the s3 client's shared request counters > +pub struct S3RequestCounterConfig { > + options: S3RequestCounterOptions, > +} why not drop this and just .. > + > /// Configuration options for client > pub struct S3ClientOptions { > /// Endpoint to access S3 object store. > @@ -103,6 +120,8 @@ pub struct S3ClientOptions { > pub rate_limiter_config: Option, > /// Proxy configuration to be used by the client. > pub proxy_config: Option, > + /// Configuration options for the client's shared request counters. > + pub request_counter_config: Option, ... ``` - pub request_counter_config: Option, + pub request_counter_config: Option, ``` here? > } > [..]