fracpete / rsync4j

Simple Java wrapper for rsync for Linux, OSX and Windows.
https://fracpete.github.io/rsync4j/
GNU General Public License v3.0
115 stars 29 forks source link

setTimeout(x) value doesn't work intermittently #45

Open srathor8x8 opened 3 months ago

srathor8x8 commented 3 months ago

Hi - We are using this library to run some rsync operations and have used a output processing timeout to be 1800 secs(30 mins). Once in a while, it not working and the thread which runs the rsync process gets stuck at at wait() method here in monitor() (AbstractProcessOutput.java).

image

This thread got stuck for several days and was recovered by manual intervention. We are using rsync version rsync4j-all:3.2.3-10.

fracpete commented 3 months ago

I've pushed out a new release of processoutput4j which you could try instead of the version that rsync4j uses:

    <dependency>
      <groupId>com.github.fracpete</groupId>
      <artifactId>processoutput4j</artifactId>
      <version>0.0.12</version>
    </dependency>
srathor8x8 commented 3 months ago

Does it contain any such probable fixes?

fracpete commented 3 months ago

Yes, I made the release specifically for that purpose.

srathor8x8 commented 3 months ago

Okay Thanks. So basically, if we are using rsync-3.3.0-0, internally it shall already be using 0.0.12 for processoutput4j, right?

fracpete commented 3 months ago

You can also use your current rsync4j version (there is no rsync4j release with processoutput4j 0.0.12 yet), simply upgrade the processoutput4j dependency.

srathor8x8 commented 3 months ago

Ok. Thanks. Few questions here:

  1. As we have the new rsync lib also available, what would be merit of using this version over 3.2.3-10.
  2. And if use it - are there any kind of regressions which are possible and we should possible test?
  3. Similarly for processoutpu4j new version, what kind of area we should focus more on testing considering this is a upgraded new release.
fracpete commented 3 months ago
  1. See the release notes of rsync4j and the release notes of rsync itself (Windows users only due to bundling of binaries, Linux/Mac check your underlying OS binary of rsync for version)
  2. See 1.
  3. processoutput4j - the only change was in regards to timeout handling, very minimal impact.