Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-3454

clearcase plugin misses changes when run from a multi-site replica

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • clearcase-plugin
    • None
    • Platform: All, OS: All

    Description

      We've got hudson running against one replica of a multi-site setup. It's building a stream that is only
      changed on the master. The master syncs with the replica every 15 minutes. Hudson seems to miss
      changes in certain situations.

      Hudson polls for changes since the last time it polled, and I think that is the problem. The clearcase
      syncing process can make changes appear on a slave in the past. For example:

      clearcase syncs at 0100 all changes from the master are copied to the replica.

      hudson polls the replica at 0103 and builds, finishing at 0105

      a change is made on the master at 0107

      hudson polls the replica at 0113 for changes since 0103, no changes yet.

      clearcase syncs at 0115, the change from 0107 is now available in the replica

      hudson polls the replica at 0123 for changes since 0113, no changes

      Notice how the change at 0107 gets lost and not built on the replica.

      One fix for this behavior is to poll for changes since the last change seen, rather than since the last poll
      time.

      Attachments

        Activity

          abayer Andrew Bayer added a comment -

          Taking issue. Not yet sure what the solution is, but I agree that it's an issue.
          I'm thinking something involving epoch times on the branch/stream may be the
          answer, but this will require some investigation.

          abayer Andrew Bayer added a comment - Taking issue. Not yet sure what the solution is, but I agree that it's an issue. I'm thinking something involving epoch times on the branch/stream may be the answer, but this will require some investigation.
          snicolai snicolai added a comment -

          There are is another caveat to be aware of. The master and the replica are in different time zones. The
          example given in the initial report only gives times in the replica timezone. Since clearcase properly
          translates times across replicas, this should not be a problem. For example, checking in at 2:05pm in
          the eastern US time zone will properly be reported as 1:05pm on a replica in the central US timezone
          (one hour behind.)

          I was slightly wrong in the description that I wrote (or hudson has changed since then) Hudson seems
          to poll since the last time it started a build. It should poll for changes since the newest file in that
          build.

          A slightly different version of the scenerio above:

          clearcase syncs at 0100 all changes from the master are copied to the replica.

          a change is made on the master at 0102

          hudson polls the replica at 0103 and builds, finishing at 0105

          hudson polls the replica at 0113 for changes since 0103, no changes yet.

          clearcase syncs at 0115, the change from 0102 is now available in the replica

          hudson polls the replica at 0123 for changes since 0103, no changes

          Notice how the change at 0102 gets lost and not built on the replica.

          snicolai snicolai added a comment - There are is another caveat to be aware of. The master and the replica are in different time zones. The example given in the initial report only gives times in the replica timezone. Since clearcase properly translates times across replicas, this should not be a problem. For example, checking in at 2:05pm in the eastern US time zone will properly be reported as 1:05pm on a replica in the central US timezone (one hour behind.) I was slightly wrong in the description that I wrote (or hudson has changed since then) Hudson seems to poll since the last time it started a build. It should poll for changes since the newest file in that build. A slightly different version of the scenerio above: clearcase syncs at 0100 all changes from the master are copied to the replica. a change is made on the master at 0102 hudson polls the replica at 0103 and builds, finishing at 0105 hudson polls the replica at 0113 for changes since 0103, no changes yet. clearcase syncs at 0115, the change from 0102 is now available in the replica hudson polls the replica at 0123 for changes since 0103, no changes Notice how the change at 0102 gets lost and not built on the replica.

          Code changed in hudson
          User: : abayer
          Path:
          trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java
          trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearCaseSCM.java
          trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearCaseUcmSCM.java
          trunk/hudson/plugins/clearcase/src/main/resources/hudson/plugins/clearcase/ClearCaseSCM/config.jelly
          trunk/hudson/plugins/clearcase/src/main/resources/hudson/plugins/clearcase/ClearCaseUcmSCM/config.jelly
          trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/AbstractClearCaseScmTest.java
          trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ClearCaseSCMTest.java
          trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ClearCaseUcmSCMTest.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=21508
          Log:
          [FIXED JENKINS-3454] Added new advanced option for MultiSite polling buffer - minutes to subtract from previous build timestamp when constructing timestamp to poll against.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/AbstractClearCaseScm.java trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearCaseSCM.java trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearCaseUcmSCM.java trunk/hudson/plugins/clearcase/src/main/resources/hudson/plugins/clearcase/ClearCaseSCM/config.jelly trunk/hudson/plugins/clearcase/src/main/resources/hudson/plugins/clearcase/ClearCaseUcmSCM/config.jelly trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/AbstractClearCaseScmTest.java trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ClearCaseSCMTest.java trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ClearCaseUcmSCMTest.java http://fisheye4.cenqua.com/changelog/hudson/?cs=21508 Log: [FIXED JENKINS-3454] Added new advanced option for MultiSite polling buffer - minutes to subtract from previous build timestamp when constructing timestamp to poll against.
          abayer Andrew Bayer added a comment -

          I've implemented something of a fix to this (for version 1.0.2) - an optional
          MultiSite poll buffer value (in minutes). It'll subtract that many minutes from
          the previous build timestamp and use the result as the time to poll against.
          It's not a perfect fix, since it'll pick up local changes in that window as well
          as remote changes, but it's the best fix I can come up with without a drastic
          rewrite of the guts of the plugin.

          abayer Andrew Bayer added a comment - I've implemented something of a fix to this (for version 1.0.2) - an optional MultiSite poll buffer value (in minutes). It'll subtract that many minutes from the previous build timestamp and use the result as the time to poll against. It's not a perfect fix, since it'll pick up local changes in that window as well as remote changes, but it's the best fix I can come up with without a drastic rewrite of the guts of the plugin.

          People

            abayer Andrew Bayer
            snicolai snicolai
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: