Fix temporal persistence wiring and restore slurp_full suite

This commit is contained in:
anthonyrawlins
2025-09-28 11:39:03 +10:00
parent 9c32755632
commit 2ff408729c
16 changed files with 1195 additions and 802 deletions

View File

@@ -201,7 +201,7 @@ func (ls *LocalStorageImpl) Retrieve(ctx context.Context, key string) (interface
entryBytes, err := ls.db.Get([]byte(key), nil)
if err != nil {
if err == leveldb.ErrNotFound {
return nil, fmt.Errorf("key not found: %s", key)
return nil, fmt.Errorf("%w: %s", ErrNotFound, key)
}
return nil, fmt.Errorf("failed to retrieve data: %w", err)
}
@@ -328,7 +328,7 @@ func (ls *LocalStorageImpl) Size(ctx context.Context, key string) (int64, error)
entryBytes, err := ls.db.Get([]byte(key), nil)
if err != nil {
if err == leveldb.ErrNotFound {
return 0, fmt.Errorf("key not found: %s", key)
return 0, fmt.Errorf("%w: %s", ErrNotFound, key)
}
return 0, fmt.Errorf("failed to get data size: %w", err)
}