From eb9a74d966ccdeb1c7a603a5f9d7957592fa66ff Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 2 Jul 2024 18:17:17 +0300 Subject: fix(tvix/store/pathinfo/bigtable): fix listing endpoint We were wrongly comparing the raw row_key with the store path digest, but we hexlower-encode the digest in the row key (via derive_pathinfo_key). Update the logic to fix that. Change-Id: I8916d8de9fb8b25a6986d4158faa91ec97c57347 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11926 Reviewed-by: Brian Olsen Autosubmit: flokli Tested-by: BuildkiteCI --- tvix/store/src/pathinfoservice/bigtable.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tvix/store/src') diff --git a/tvix/store/src/pathinfoservice/bigtable.rs b/tvix/store/src/pathinfoservice/bigtable.rs index 707a686c0a54..26d07689d71f 100644 --- a/tvix/store/src/pathinfoservice/bigtable.rs +++ b/tvix/store/src/pathinfoservice/bigtable.rs @@ -398,7 +398,9 @@ impl PathInfoService for BigtablePathInfoService { .validate() .map_err(|e| Error::StorageError(format!("invalid PathInfo: {}", e)))?; - if store_path.digest().as_slice() != row_key.as_slice() { + let exp_path_info_key = derive_pathinfo_key(store_path.digest()); + + if exp_path_info_key.as_bytes() != row_key.as_slice() { Err(Error::StorageError("PathInfo has unexpected digest".into()))? } -- cgit 1.4.1