GithubHelp home page GithubHelp logo

Comments (9)

jjshoe avatar jjshoe commented on July 20, 2024

@alexmreis

from deb-s3.

jjshoe avatar jjshoe commented on July 20, 2024

And by simple, I mean, getting a list of all arch types, getting a lock on each, storing that an array, and looping to unlock.

from deb-s3.

alexmreis avatar alexmreis commented on July 20, 2024

I'd suggest the fix would actually be requiring the architecture to be explicitly specified if -l is used and exiting with an error if it isn't. Having multiple locks increases the complexity of something that is already fragile. That said if you consistently don't specify the architecture, then the behaviour of the locking mechanism is still consistent, albeit a bit dirty to the repo layout.

The eventual consistency for removal of the lock doesn't matter much, as it would only be potentially dangerous to actually go ahead and write things to the repository while someone else is also doing it. There is a built-in polling wait mechanism in -l that retries to acquire a lock for some time before giving up.

The -l option always checks for an existing lock first, and if and only if a lock is not found does it try to write a new lockfile, so a replace wouldn't ever occur. Read-after-write consistency is good enough for the purposes of at least adding packages. I strongly advise against deleting any without revoking permissions to the bucket to all other users first.

Could you please elaborate on the issue you have uncovered regarding the eventual consistency @jjshoe ?

from deb-s3.

jjshoe avatar jjshoe commented on July 20, 2024

@alexmreis I deleted the eventual consistency comment from here, I'll make a new issue when I come up with a great way to reproduce.

from deb-s3.

jjshoe avatar jjshoe commented on July 20, 2024

@alexmreis also, see #95.

from deb-s3.

jjshoe avatar jjshoe commented on July 20, 2024

@alexmreis - Actually, I have the nail in the coffin, and the safest possible way for you to do this anyway. You should lock at the bucket level. I know, then it's not as fast as it could be, but bucket-name/dists/stable/Release gets updated every run as well.

from deb-s3.

jjshoe avatar jjshoe commented on July 20, 2024

Also worth noting, specifying an architecture type out front makes it difficult to upload a whole mess of deb files of different arch types.

from deb-s3.

alexmreis avatar alexmreis commented on July 20, 2024

A bucket level lock breaks the idea of multiple repositories in the same bucket that the --prefix option allows for. It should at least be on the prefix level, but I do like the idea @jjshoe

from deb-s3.

jjshoe avatar jjshoe commented on July 20, 2024

@alexmreis yes, sorry, I'm all for prefix, replace bucket with repository.

from deb-s3.

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.