Git Product home page Git Product logo

Comments (2)

mosquito avatar mosquito commented on June 25, 2024

This offers speed advantages, and if journaling is enabled on the file system, there is significantly small potential risk of data loss.

from aiofile.

ustulation avatar ustulation commented on June 25, 2024

The point is:

  1. If you expose a well known API that says/means to do x but ends up doing y, that could be categorised as being misleading (of the API).
  2. As a library writer, and IMO, you should just expose the functionality and let the users decide on the "significantly small potential risk of data loss", otherwise you are just assuming that all past, current and future users and systems would be unaffected and/or see things the way you see as opposed to what is otherwise the norm (which I think is a flawed premise). For eg. I do millions upon millions of records and checkpoints on an NFS where multiple systems are reading the data (so multiple OSes involved). This runs for weeks and months. At that scale the "small potential" becomes magnified. There have been occasions where the checkpoint was written before the actual data could be persisted before the writer crashed. So if I want my fsyncs to really mean fsyncs and don't want to work out what systems treat those two differently and what's the difference etc I'm unable to do it here.
  3. I don't claim to have read or understood your source code thoroughly but it seems you have an underlying facility in place already: https://github.com/mosquito/caio/blob/c2a39f8e3fdb52068a11d1193ed530cd3588e039/caio/abstract.py#L42. This frontend is simply calling the wrong function. Could it not just have fsync call fsync and fdsync call fdsync?

from aiofile.

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.