rsync investigation
The replication services relies on rsync as its main transfer protocol, but not much has been done to help manage processes which are executed outside of the context of the jvm. There are a few places of investigation which we need to do in order to ensure our rsyncs behave well and respond how we expect.
- Exit codes: Occasionally we'll see rsync fail with various codes - depending on what is returned it may be that we can rerun the rsync and it will complete successfully.
- Hidden files: When rsync does get interrupted, we sometimes see hidden files left behind. We should look into the flags which can be passed in to see if rsync can clean up after itself.
- JVM Interrupts: We want to make sure child processes spawned by our jvm are killed if it is interrupted. This will prevent us from running multiple rsyncs for a single bag if we do get interrupted.