Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using multiple stores, it doesn't try 2nd store if chunk missing on first #238

Closed
garyvdm opened this issue Jun 23, 2023 · 3 comments · Fixed by #239
Closed

When using multiple stores, it doesn't try 2nd store if chunk missing on first #238

garyvdm opened this issue Jun 23, 2023 · 3 comments · Fixed by #239

Comments

@garyvdm
Copy link

garyvdm commented Jun 23, 2023

We have 2 stores that have eventual consistency, but there are periods of time when one of them may be missing chunks.

We thought that we could use desync to try both stores when fetching, but this seems to not be working.

Running build the latest version from master:

~/desync/cmd/desync (git)-[master] # git describe
v0.9.3-8-g4d48f59

When chunk is only available on 2nd server, desync cache fails:

~/desync/cmd/desync (git)-[master] # ./desync cache -c /srv/prod_images/store.castr -s http://server1/store.castr/ -s http://server2/store.castr/ /srv/prod_images/archive/23-05-3/workstation.caibx
[>-----------------------------------------------------------------------------------------------------------------------------------------------------]   0.02% 0s
Error: http://server1/store.castr/: object c7f6/c7f666d66a77b2e37cc349327607c2192d8ecab521ab1ae5f432d5c9d19b23da missing from store

~/desync/cmd/desync (git)-[master] # curl --head http://server2/store.castr/c7f6/c7f666d66a77b2e37cc349327607c2192d8ecab521ab1ae5f432d5c9d19b23da
HTTP/1.1 404 Not Found
Server: webfs/1.21
Connection: Keep-Alive
Accept-Ranges: bytes
Content-Type: text/plain
Content-Length: 28
Date: Fri, 23 Jun 2023 13:18:34 GMT

~/desync/cmd/desync (git)-[master] # curl --head http://server2/store.castr/c7f6/c7f666d66a77b2e37cc349327607c2192d8ecab521ab1ae5f432d5c9d19b23da
HTTP/1.1 200 OK
Server: webfs/1.21
Connection: Keep-Alive
Accept-Ranges: bytes
Content-Type: text/plain
Content-Length: 42399
Last-Modified: Fri, 02 Jun 2023 08:13:28 GMT
Date: Fri, 23 Jun 2023 13:18:37 GMT
@folbricht
Copy link
Owner

Hmm, that looks like a bug. Would you be able to try this with local stores? That would help narrow it down, to see if it's only an issue with multiple HTTP stores.

@folbricht
Copy link
Owner

Pretty sure I found the bug and fixed it in #239 if you want to give this branch a try. It was only affecting HTTP stores, and must have been there for a while. Thanks for the detailed report.

@ljjacobs
Copy link

colleague of @garyvdm, tested #239 and it seems to be working as expected now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants