From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 914F463F68 for ; Thu, 29 Oct 2020 13:11:28 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 836138D70 for ; Thu, 29 Oct 2020 13:11:28 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 7848B8D5C for ; Thu, 29 Oct 2020 13:11:27 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 3A1D445F8A for ; Thu, 29 Oct 2020 13:11:27 +0100 (CET) To: Proxmox Backup Server development discussion , Dominik Csapak References: <20201029095013.4885-1-d.csapak@proxmox.com> From: Thomas Lamprecht Message-ID: <2e163113-53d4-5c93-95f8-8b84fddd4400@proxmox.com> Date: Thu, 29 Oct 2020 13:11:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:83.0) Gecko/20100101 Thunderbird/83.0 MIME-Version: 1.0 In-Reply-To: <20201029095013.4885-1-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.125 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] applied: [PATCH proxmox-backup v2] server/worker_task: simplify task log writing X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 12:11:28 -0000 On 29.10.20 10:50, Dominik Csapak wrote: > instead of prerotating 1000 tasks > (which resulted in 2 writes each time an active worker was finished) > simply append finished tasks to the archive (which will be rotated) > > page cache should be good enough so that we can get the task logs fast > > since existing installations might have an 'index' file, we > still have to read tasks from there, but only if it exists > > this simplifies the TaskListInfoIterator a good amount > > Signed-off-by: Dominik Csapak > --- > we now write all finished tasks into the archive, as soon as > any code tries to iterate over any finished task > > this way we can remove most of the index handling code, besides > that tiny bit of compatibility that we can drop with 1.x > > src/server/worker_task.rs | 91 +++++++++++++-------------------------- > 1 file changed, 29 insertions(+), 62 deletions(-) > > applied, thanks!