public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	 Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup] fix #5622: backup client: properly handle rate/burst parameters
Date: Tue, 23 Jul 2024 14:51:48 +0200 (CEST)	[thread overview]
Message-ID: <1188716440.3583.1721739108877@webmail.proxmox.com> (raw)
In-Reply-To: <a1151392-963d-4dfe-b184-b94e656cd5da@proxmox.com>


> On 23.07.2024 14:48 CEST Christian Ebner <c.ebner@proxmox.com> wrote:
> 
>  
> On 7/23/24 12:04, Dominik Csapak wrote:
> > the rate and burst parameters are integers, so the mapping from value
> > with `.as_str()` will always return `None` effectively never
> > applying any rate limit at all.
> > 
> > To fix it, just map from u64 to HumanByte.
> > 
> > Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> > ---
> > 
> > Alternatively, we could introduce a new string schema to parse into
> > HumanByte, if that's preferred. (Did not do it that way, because this
> > fix was way faster for me and is also OK in my opinion).
> 
> There is already a string schema definition for rate limits [0], might 
> be worth to reuse that and parse into `HumanByte` as you suggested?
> 
> [0] 
> https://git.proxmox.com/?p=proxmox-backup.git;a=blob;f=pbs-api-types/src/traffic_control.rs;h=fb264531e291329fbc0a0a7f54da158ba50e8bb1;hb=HEAD#l21

Ah no, this is the already used IntegerSchema, never mind.


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


  reply	other threads:[~2024-07-23 12:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23 10:04 Dominik Csapak
2024-07-23 12:48 ` Christian Ebner
2024-07-23 12:51   ` Christian Ebner [this message]
2024-08-01 12:44 ` Christian Ebner
2024-08-01 13:14   ` Christian Ebner
2024-08-07 19:20 ` Thomas Lamprecht
2024-08-08  6:51   ` Dominik Csapak
2024-08-09  8:22 ` Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1188716440.3583.1721739108877@webmail.proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal