Coder Social home page Coder Social logo

Comments (7)

znerol avatar znerol commented on June 3, 2024 1

I'm observing that too. In my case it would be perfect if mc would exit with a non-zero status code if the connection to the bucket is lost.

Browsing through the code, I found the following (just a hypothesis, haven't tested my observations at all):

If I'm not mistaken, errors from the watcher are handled on line 754ff in mirror-main.go. If an error occurs, it is forwarded to the parallel manager (mj.parallel.queueTask()).

The parallel manager will handle that error task in one of its workers. If a worker encounters an error task, then it simply terminates itself (line 97ff in parallel-manager.go). But all the others seem to continue as if nothing happened.

from mc.

klauspost avatar klauspost commented on June 3, 2024

Not sure if this is something we want to fix. If a remote is down, we will not receive notifications and mirror will miss entries.

Restarting mc seems like the reasonable solution to re-enumerate the files on either side.

from mc.

harshavardhana avatar harshavardhana commented on June 3, 2024

That is what is expected from mc --watch not sure why it's failing.

from mc.

klauspost avatar klauspost commented on June 3, 2024

Well, the server isn't up when it is called, hence the connect: connection refused Isn't there just an mc ping -x miniohost missing?

from mc.

harshavardhana avatar harshavardhana commented on June 3, 2024

Well, the server isn't up when it is called, hence the connect: connection refused Isn't there just an mc ping -x miniohost missing?

No the idea was that even with that it perpetually keeps retrying. Looks like someone has changed the code.

from mc.

klauspost avatar klauspost commented on June 3, 2024

Well, that is a problem, if it changed then.

from mc.

znerol avatar znerol commented on June 3, 2024

It seems that the code in parallel-manager.go doesn't actually handle the error, but just passes it back to the result channel. That one is polled in 535ff in mirror-main.go.

Maybe there should be a distinction between fatal errors (connection lost to bucket) and recoverable errors. In that case it would be possible to make a distinction at line 588ff

from mc.

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.