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 <me@griff.name> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
This commit is contained in:
parent
618aacaa61
commit
eb9a74d966
1 changed files with 3 additions and 1 deletions
|
@ -398,7 +398,9 @@ impl PathInfoService for BigtablePathInfoService {
|
||||||
.validate()
|
.validate()
|
||||||
.map_err(|e| Error::StorageError(format!("invalid PathInfo: {}", e)))?;
|
.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()))?
|
Err(Error::StorageError("PathInfo has unexpected digest".into()))?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue