public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] client: backup writer: make no-cache parameter backwards compatible
@ 2025-07-23 11:50 Christian Ebner
  2025-07-23 11:57 ` [pbs-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Ebner @ 2025-07-23 11:50 UTC (permalink / raw)
  To: pbs-devel

Commit 90723828 ("api: backup: add no-cache flag to bypass local
datastore cache") introduced the additional flag to request bypassing
of the datastore cache by the Proxmox Backup Server.

The flag is however included in the backup api request parameters,
which is incompatible with older version of the server.

Fix this by only setting the flag if requested explicitley on
invocation, as it is then not included for requests to older servers
and for newer the default is to set this to false if not present
anyways.

Fixes: 90723828 ("api: backup: add no-cache flag to bypass local datastore cache")
Reported-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 pbs-client/src/backup_writer.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pbs-client/src/backup_writer.rs b/pbs-client/src/backup_writer.rs
index abe7c79e2..9f62baba3 100644
--- a/pbs-client/src/backup_writer.rs
+++ b/pbs-client/src/backup_writer.rs
@@ -102,8 +102,10 @@ impl BackupWriter {
             "store": writer_options.datastore,
             "debug": writer_options.debug,
             "benchmark": writer_options.benchmark,
-            "no-cache": writer_options.no_cache,
         });
+        if writer_options.no_cache {
+            param["no-cache"] = serde_json::to_value(writer_options.no_cache)?;
+        }
 
         if !writer_options.ns.is_root() {
             param["ns"] = serde_json::to_value(writer_options.ns)?;
-- 
2.47.2



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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-23 12:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-23 11:50 [pbs-devel] [PATCH proxmox-backup] client: backup writer: make no-cache parameter backwards compatible Christian Ebner
2025-07-23 11:57 ` [pbs-devel] applied: " Thomas Lamprecht
2025-07-23 12:08   ` Maximiliano Sandoval

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