Git Product home page Git Product logo

Comments (11)

hishamhm avatar hishamhm commented on May 22, 2024

Oh, that's a big one.

"Atomically", when dealing with many files and directories in the filesystem is not very feasible, but I understand that it would be ideal to make it "as atomic as possible".

We'd probably need something to handle the Ctrl+C signal (lua_signal?), and also to be able to handle correctly Ctrl+C when performed during external commands that are launched by LuaRocks.

Looks like "Ctrl+C friendliness" could probably evolve in a number of stages.

from luarocks.

agladysh avatar agladysh commented on May 22, 2024

If possible, please do some simple fix for the manifest corruption issue first, as it bites us rather sharply :-)

from luarocks.

hishamhm avatar hishamhm commented on May 22, 2024

Any hints on how to reproduce this? Do you know how to trigger a corruption? Simply pressing Ctrl+C while the package is being built doesn't seem to do the trick here.

from luarocks.

agladysh avatar agladysh commented on May 22, 2024

It is a tricky one, unfortunately. We only ever see it (I think) because our script installs a lot of rocks and we run it often.

Maybe mount some artificially slowed down FS (sshfs + iprelay? would be cool if that would work, please share your experience), so the write speed is really low, and try hitting CTRL+C while LR is writing?

from luarocks.

agladysh avatar agladysh commented on May 22, 2024

Semi-offtopic: I was curious about FS write speed shaping, so I asked a question on ServerFault: http://serverfault.com/questions/358955/filesystem-speed-shaper-for-linux. Let's see if there is an out-of-the-box solution.

from luarocks.

avnik avatar avnik commented on May 22, 2024

BTW writing to temporary file (manifest.tmp for example), then rename ("ln -f" on unixes) should help

from luarocks.

hishamhm avatar hishamhm commented on May 22, 2024

@avnik, any reason for using "ln -f" over "mv"?

from luarocks.

avnik avatar avnik commented on May 22, 2024

I mean sequence of
posix.link(name, tmpoldname)
posix.unlink(name)
posix.link(tmpnewname, name)
posix.unlink(tmpoldname)
should be very atomic.

"mv -f" should be enough atomic, if new tmp file created in same filesystem (same folder usually mean same fs, /tmp and /usr/local usually different fs)

from luarocks.

Tieske avatar Tieske commented on May 22, 2024

just browsing some old issues;

@agladysh: has the fix by @hishamhm helped resolve your issue? if so can this one be closed?

from luarocks.

agladysh avatar agladysh commented on May 22, 2024

Erm. That is a good question.

@avnik ping :-)

from luarocks.

hishamhm avatar hishamhm commented on May 22, 2024

has the fix by @hishamhm helped resolve your issue? if so can this one be closed?

I guess 6.5 years is a good enough timeout :)

from luarocks.

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.