Giter VIP home page Giter VIP logo

Comments (2)

windoze avatar windoze commented on July 30, 2024

It's pretty hard to produce a real error, but I roughly looked at the code, and I found:

  1. Panamax just serves static files, so new additions won't affect anything existing.
  2. Panamax syncs in 2 stages, index first and then crates, the index updating is merely a git pull and ff checkout, it should be safe in almost every case.
  3. The race condition exists after index updating and before all crates are downloaded. When new crates are being downloaded, it's possible that the client gets 404 or even half-downloaded files because the index already got updated hence the client assumes the crate exists on the server side, but I guess re-run cargo can resolve most problems.

Given the situation I guess the fix won't be very straightforward, but otho the issue is not very significant either.

I'm thinking of combining the serving and syncing functions into one process, so they can talk to each other and lock/pause the other one when needed, it could be the simplest way.

from panamax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.