• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None

      Make Node implement Saveable

          [JENKINS-31055] Make Node implement Saveable

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          core/src/main/java/jenkins/model/Nodes.java
          http://jenkins-ci.org/commit/jenkins/8645978bfbe272a494d2bc65cf47104255cfb3fb
          Log:
          JENKINS-31055 Finessing the exception handling

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/jenkins/model/Nodes.java http://jenkins-ci.org/commit/jenkins/8645978bfbe272a494d2bc65cf47104255cfb3fb Log: JENKINS-31055 Finessing the exception handling

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          core/src/main/java/hudson/model/Node.java
          http://jenkins-ci.org/commit/jenkins/db37c76327748261c3b01eebd13369a1ca733282
          Log:
          JENKINS-31055 Replacing @since tag with placeholder to be restored on merge

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/model/Node.java http://jenkins-ci.org/commit/jenkins/db37c76327748261c3b01eebd13369a1ca733282 Log: JENKINS-31055 Replacing @since tag with placeholder to be restored on merge

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          core/src/main/java/hudson/model/Node.java
          http://jenkins-ci.org/commit/jenkins/8e24f69013e96e8b7f8b86e9b7a9133e2412c638
          Log:
          JENKINS-31055 The intent of Node.save() is a no-op when not in Jenkins list of nodes

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/model/Node.java http://jenkins-ci.org/commit/jenkins/8e24f69013e96e8b7f8b86e9b7a9133e2412c638 Log: JENKINS-31055 The intent of Node.save() is a no-op when not in Jenkins list of nodes

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          core/src/main/java/jenkins/model/Nodes.java
          http://jenkins-ci.org/commit/jenkins/d2276c3c9b16fd46a3912ab8d58c418e67d8ce3e
          Log:
          JENKINS-31055 Note theoretical race condtion

          Seems rather unlikely, but none the less it is a possibility. Not sure how we should handle this though:

          • We do not want to hold the Queue lock while performing I/O as that will grind everything to a halt
          • We do not want a big fat lock on all nodes
          • If we have a per-node lock then the save everything method may have to grab them all

          In short, it gets ugly real fast.

          For now, I believe that the risk is very low as releasing a lock does not intrinsically deschedule a currently running thread so the likely course of events is that the thread will release the lock and at least start the save before a competing thread could acquire the lock update remove the node release the lock and delete the node's directory

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/jenkins/model/Nodes.java http://jenkins-ci.org/commit/jenkins/d2276c3c9b16fd46a3912ab8d58c418e67d8ce3e Log: JENKINS-31055 Note theoretical race condtion Seems rather unlikely, but none the less it is a possibility. Not sure how we should handle this though: We do not want to hold the Queue lock while performing I/O as that will grind everything to a halt We do not want a big fat lock on all nodes If we have a per-node lock then the save everything method may have to grab them all In short, it gets ugly real fast. For now, I believe that the risk is very low as releasing a lock does not intrinsically deschedule a currently running thread so the likely course of events is that the thread will release the lock and at least start the save before a competing thread could acquire the lock update remove the node release the lock and delete the node's directory

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          changelog.html
          core/src/main/java/hudson/model/Computer.java
          core/src/main/java/hudson/model/Node.java
          core/src/main/java/jenkins/model/Jenkins.java
          core/src/main/java/jenkins/model/Nodes.java
          http://jenkins-ci.org/commit/jenkins/695fe6bf5dcea42cb1195c8c298c6a5df033a918
          Log:
          Merge pull request #1877 from stephenc/jenkins-31055

          [FIXED JENKINS-31055] Make Node implement Saveable

          Compare: https://github.com/jenkinsci/jenkins/compare/2d1d47edef3b...695fe6bf5dce

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: changelog.html core/src/main/java/hudson/model/Computer.java core/src/main/java/hudson/model/Node.java core/src/main/java/jenkins/model/Jenkins.java core/src/main/java/jenkins/model/Nodes.java http://jenkins-ci.org/commit/jenkins/695fe6bf5dcea42cb1195c8c298c6a5df033a918 Log: Merge pull request #1877 from stephenc/jenkins-31055 [FIXED JENKINS-31055] Make Node implement Saveable Compare: https://github.com/jenkinsci/jenkins/compare/2d1d47edef3b...695fe6bf5dce

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          core/src/main/java/hudson/model/Node.java
          http://jenkins-ci.org/commit/jenkins/86f8574ff5bbe82fc4931c29dbd55319e96a8e06
          Log:
          JENKINS-31055 Update @since tag

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/model/Node.java http://jenkins-ci.org/commit/jenkins/86f8574ff5bbe82fc4931c29dbd55319e96a8e06 Log: JENKINS-31055 Update @since tag

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4337
          [FIXED JENKINS-31055] Make Node implement Saveable (Revision e4b1aab4acab93d638624c7705cfe6eea2d01786)
          JENKINS-31055 Finessing the exception handling (Revision 8645978bfbe272a494d2bc65cf47104255cfb3fb)
          JENKINS-31055 Replacing @since tag with placeholder to be restored on merge (Revision db37c76327748261c3b01eebd13369a1ca733282)
          JENKINS-31055 The intent of Node.save() is a no-op when not in Jenkins list of nodes (Revision 8e24f69013e96e8b7f8b86e9b7a9133e2412c638)
          JENKINS-31055 Note theoretical race condtion (Revision d2276c3c9b16fd46a3912ab8d58c418e67d8ce3e)

          Result = SUCCESS
          stephen connolly : e4b1aab4acab93d638624c7705cfe6eea2d01786
          Files :

          • core/src/main/java/jenkins/model/Nodes.java
          • core/src/main/java/hudson/model/Node.java
          • changelog.html
          • core/src/main/java/hudson/model/Computer.java
          • core/src/main/java/jenkins/model/Jenkins.java

          stephen connolly : 8645978bfbe272a494d2bc65cf47104255cfb3fb
          Files :

          • core/src/main/java/jenkins/model/Nodes.java

          stephen connolly : db37c76327748261c3b01eebd13369a1ca733282
          Files :

          • core/src/main/java/hudson/model/Node.java

          stephen connolly : 8e24f69013e96e8b7f8b86e9b7a9133e2412c638
          Files :

          • core/src/main/java/hudson/model/Node.java

          stephen connolly : d2276c3c9b16fd46a3912ab8d58c418e67d8ce3e
          Files :

          • core/src/main/java/jenkins/model/Nodes.java

          dogfood added a comment - Integrated in jenkins_main_trunk #4337 [FIXED JENKINS-31055] Make Node implement Saveable (Revision e4b1aab4acab93d638624c7705cfe6eea2d01786) JENKINS-31055 Finessing the exception handling (Revision 8645978bfbe272a494d2bc65cf47104255cfb3fb) JENKINS-31055 Replacing @since tag with placeholder to be restored on merge (Revision db37c76327748261c3b01eebd13369a1ca733282) JENKINS-31055 The intent of Node.save() is a no-op when not in Jenkins list of nodes (Revision 8e24f69013e96e8b7f8b86e9b7a9133e2412c638) JENKINS-31055 Note theoretical race condtion (Revision d2276c3c9b16fd46a3912ab8d58c418e67d8ce3e) Result = SUCCESS stephen connolly : e4b1aab4acab93d638624c7705cfe6eea2d01786 Files : core/src/main/java/jenkins/model/Nodes.java core/src/main/java/hudson/model/Node.java changelog.html core/src/main/java/hudson/model/Computer.java core/src/main/java/jenkins/model/Jenkins.java stephen connolly : 8645978bfbe272a494d2bc65cf47104255cfb3fb Files : core/src/main/java/jenkins/model/Nodes.java stephen connolly : db37c76327748261c3b01eebd13369a1ca733282 Files : core/src/main/java/hudson/model/Node.java stephen connolly : 8e24f69013e96e8b7f8b86e9b7a9133e2412c638 Files : core/src/main/java/hudson/model/Node.java stephen connolly : d2276c3c9b16fd46a3912ab8d58c418e67d8ce3e Files : core/src/main/java/jenkins/model/Nodes.java

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4338
          JENKINS-31055 Update @since tag (Revision 86f8574ff5bbe82fc4931c29dbd55319e96a8e06)

          Result = SUCCESS
          stephen connolly : 86f8574ff5bbe82fc4931c29dbd55319e96a8e06
          Files :

          • core/src/main/java/hudson/model/Node.java

          dogfood added a comment - Integrated in jenkins_main_trunk #4338 JENKINS-31055 Update @since tag (Revision 86f8574ff5bbe82fc4931c29dbd55319e96a8e06) Result = SUCCESS stephen connolly : 86f8574ff5bbe82fc4931c29dbd55319e96a8e06 Files : core/src/main/java/hudson/model/Node.java

          Daniel Beck added a comment -

          It's not clear why this is an lts-candidate. In fact, it's not clear why this was needed at all.

          Daniel Beck added a comment - It's not clear why this is an lts-candidate. In fact, it's not clear why this was needed at all.

          For reference, hence fix merged in jenkins-1.635 and jenkins-1.651.1

          Baptiste Mathus added a comment - For reference, hence fix merged in jenkins-1.635 and jenkins-1.651.1

            stephenconnolly Stephen Connolly
            stephenconnolly Stephen Connolly
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: