After dealing with this intermittent issue for a few more days now, I seem 
to have the best luck with restarting my server (not perkeepd). Not sure 
why "reloading" the the go perkeep client lib would cause it to find these 
blobs any better, after removing the cache, not sure what it could be doing 
other than calling to the perkeep REST API? 

On Sunday, January 26, 2025 at 10:54:56 AM UTC-5 Quinn wrote:

> I am seeing this again, and it seems to be intermittent. A blob will 
> definitely exist (i confirm in ~/var), but I will get an error on 
> client.Fetch, and also client.SimpleEnumerateBlobs does not include the 
> hash. I restart my server a couple times, or restart perkeepd, and suddenly 
> it can retrieve the blob without me changing anything in the code. 
>
> This is how I'm initiating the client:
>
>     optTransportConfig := client.OptionTransportConfig(&client.
> TransportConfig{})
>     cl := client.NewOrFail(client.OptionInsecure(false), 
> optTransportConfig)
>
> On Thursday, January 23, 2025 at 10:09:17 PM UTC-5 Quinn wrote:
>
>> OK, I just removed the disk cache and am fetching from the client 
>> directly and it works.. The disk cache was copy pasta =(
>>
>> Quinn
>>
>> On Thursday, January 23, 2025 at 9:52:51 PM UTC-5 Quinn wrote:
>>
>>> Here's more context:
>>>
>>>     br, ok := blob.Parse(hash)
>>>     if !ok {
>>>         return nil, fmt.Errorf("failed to parse argument %q as a blobref
>>> ", hash)
>>>     }
>>>
>>>     src, err := cacher.NewDiskCache(p.cl)
>>>     if err != nil {
>>>         log.Fatalf("Error setting up local disk cache: %v", err)
>>>     }
>>>     defer src.Clean()
>>>
>>> Quinn
>>>
>>> On Thursday, January 23, 2025 at 9:51:23 PM UTC-5 Quinn wrote:
>>>
>>>> Here's the code:
>>>>     rc, _, err := src.Fetch(ctx, br)
>>>>     if err != nil {
>>>>         return nil, fmt.Errorf("failed to fetch %s: %s", br, err)
>>>>     }
>>>> error message:
>>>>
>>>> failed to fetch 
>>>> sha224-64660a1aaedf98702e9ca80ea9287c7bcd1be3b09dc9a5fcd2bbd67a: file does 
>>>> not exist  
>>>>
>>>> However, there is a datfile for this:
>>>>
>>>> ls -l 
>>>> ~/var/perkeep/blobs/sha224/64/66/sha224-64660a1aaedf98702e9ca80ea9287c7bcd1be3b09dc9a5fcd2bbd67a.dat
>>>> -rw------- 1 quinn quinn 249 Jan 18 21:33 
>>>> /home/quinn/var/perkeep/blobs/sha224/64/66/sha224-64660a1aaedf98702e9ca80ea9287c7bcd1be3b09dc9a5fcd2bbd67a.dat
>>>>
>>>> I have my server configured with index disabled. This error is 
>>>> intermittent, sometimes it goes away on its own, i think. Do i need to 
>>>> rebuild the cache manually sometimes?
>>>>
>>>> Quinn
>>>>
>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Perkeep" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/perkeep/045a323f-925a-4ed3-9a89-bb48a8caf3e1n%40googlegroups.com.

Reply via email to