Giter Site home page Giter Site logo

Comments (5)

philcryer avatar philcryer commented on June 15, 2024

So you say the altered files on the LAPTOP are copied to the server, but isn't that correct? Those files are newer than the files on the PC (server) yes? I could be missing something, are you saying that the files on the PC (server) are overwriting the newer files on the LAPTOP? Let me know, if that's the case I may have some ideas. Thanks!

from lipsync.

explicitlyambiguous avatar explicitlyambiguous commented on June 15, 2024

Thanks for the response.

Files on LAPTOP are being deleted.

For example:
*LAPTOP and PC are both on and synced with the files "file1, file2"
*PC turned off
*add new file "file3" on LAPTOP
*turn on PC
*"file3" is deleted from the LAPTOP

Expected behaviour: "file3" should be copied to PC

Hope that makes it clearer.

from lipsync.

chungyan5 avatar chungyan5 commented on June 15, 2024

i have a similar situation.

My server is 24hrs power ON, my client is going to sleep when i am not using it. When i re-use the client, i wake up it, and operate the files, and find that if i update/create a new file in client, it will auto. remove, due to server does not have this file.

I saw the ~/.lipsyncd/lipsyncd.log, i saw that the user cron job is working on every minutes and tracking any update data from server, and rsync to client. So the update/create a new file in client is removed after this cron and rsync from server to client.

I find out that my daemon is missing (it's main duty is copy the client update/create new file to server), i just simple manually stop and start(restart cannot work, but have not checked) this daemon again, then everything is working again, but i am still in observation.

I do not know why the daemon is suddenly stop, and i will post any new observation if i find any new.

So Explicitlyambiguous, please take a look your daemon existing or not.

from lipsync.

philcryer avatar philcryer commented on June 15, 2024

A user emailed the other day which I think has helped me figure this out, because I was stumped on it for awhile.

I seems to be a race condition in lipsync. While adding a new file immediately gets synced to the server, new things on the server are only copied in when new things go up, or if initiated by cron to check for new things. Problem happens when you're uploading multiple things (or large things) and it kicks a server download before it's all complete either via cron, or manually. The server doesn't know about the new things it hasn't gotten yet, so they are deleted on the client!

There needs to be a check, by the cron runner; if something is uploading, go to sleep and try again later.

investigating...

from lipsync.

philcryer avatar philcryer commented on June 15, 2024

Ok, I used code from ka2er's post in a different issue to solve this; now cron runs check for existing syncs (so you add new files, they're being uploaded, but they're not all on the server yet, the client cron run with not run so it doesn't stomp on those) and I think this solves the race condition issue. Commit is: b4fbf40

Can someone check with the on/off syncing issue? I'll setup a test for that, but I'm hoping it will solve that too - if this still breaks for you feel free to reopen. Thanks!

from lipsync.

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.