Coder Social home page Coder Social logo

Comments (5)

gilv avatar gilv commented on July 28, 2024

@djalova Can you check it please?

from stocator.

michaelfactor avatar michaelfactor commented on July 28, 2024

@gilv In addition to the above, instead of doing the head at all, would it make sense to try the PUT of the object, catch the exception for the non-existing container and create the container, and then redo the object PUT? The check first approach typically involves two calls but can be three. The try and recover approach is typically one call but can be three. The check first approach is simpler code.

from stocator.

gilv avatar gilv commented on July 28, 2024

@michaelfactor it depends on what is the 1st operation. If it's PUT - then your suggestion is fine. But it may be HEAD, or GET, etc.. so we will need to try-catch many operation in Stocator. It will be complicated change, since there is no single point when there is HEAD or GET.

from stocator.

michaelfactor avatar michaelfactor commented on July 28, 2024

@gilv Agreed completely -- this is a performance-simplicity tradeoff and the recovery on the HEAD or GET will be different for the PUT. Not sure you need to autocreate on HEAD or GET of an object since if the container doesn't exist, obviously the object doesn't. But this is obviously a performance optimization and we need to understand its value in practice before rushing to make the change.

from stocator.

djalova avatar djalova commented on July 28, 2024

@gilv I think all operations start out by calling FileSystem.exists() whether its a PUT or GET operation. In the case where auto create is off should we just throw a new exception when a container is not present?

from stocator.

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.