Coder Social home page Coder Social logo

lte678 / fmerge_cpp Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 372 KB

Two-way remote file sync and conflict resolution application

License: GNU General Public License v3.0

CMake 0.39% C++ 98.11% C 0.01% Python 1.48%
file-transfer filesync high-performance

fmerge_cpp's People

Contributors

lte678 avatar

Watchers

 avatar

fmerge_cpp's Issues

Folder locking

We should lock the current folder to stop other instances of fmerge being run in parallel.

This is probably easiest done via a setting in the config file

Graceful exit

The program should exit gracefully once it completes.

This will require two changes:

  • Keep track of pending file operations and their asynchronous completion
  • Implement exit mechanisms for any daemon threads that may be running

Large files

Presumably, the application will crash when transferring files that do not fit into RAM, since we are not doing any chunking currently.

Fix.

Daemon mode

(Optionally) stop the server from exiting after finishing with a client. This would allow it to run headlessly on a server.

Crash when connecting to peer

Segfault at:
#0 fmerge::connect_to_server(int, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::function<void (std::unique_ptr<fmerge::Connection, std::default_deletefmerge::Connection >)>) (port=4512, server_addr=..., conn_handler=...) at /home/leon/Projects/FileMerge/fmerge_cpp/src/Connection.cpp:256
256 char ip = inet_ntoa(((struct sockaddr_in)result->ai_addr)->sin_addr);

The issue occurs when the provided hostname is incorrect.

Check testing file results

Currently, we are trusting the exit code of Fmerge to check if the file sync was successful or not. In the future, we should also check the results to make sure they are OK.

Race conditions when using multiple workers deleting nested folders.

When nested folders are to be deleted, the application fails due to the parent folder being deleted before the child folder (despite correct sorting of file operations). Because folders with any contents within them cannot be deleted, this causes the file system state to become dirty.

  • Write test demonstrating issue
  • Fix

Duplicate file change entries in filechanges.db after transfer

This is due to us writing the new merged change list at the end of the file sync process. This causes issues once the file tree database is updated at startup, since it also detects the change.

To avoid this, the easiest solution is the unification of file-change and file-tree databases. Only the change list is required, and the file tree can be reconstructed as necessary.

Deadlock during sync for large workloads

For larger (more realistic) workloads, the software locks up.
The test case "bidir-medium-files" was created to reproduce the issue.

Very important to fix! Causes file corruption.

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.