Branch: refs/heads/prefetch-JENKINS-15120
  Home:   https://github.com/jenkinsci/remoting
  Commit: 0659535242d98cb7b6afeae0d72b8a955d59efa5
      
https://github.com/jenkinsci/remoting/commit/0659535242d98cb7b6afeae0d72b8a955d59efa5
  Author: Kohsuke Kawaguchi <k...@kohsuke.org>
  Date:   2013-01-06 (Sun, 06 Jan 2013)

  Changed paths:
    M src/main/java/hudson/remoting/Capability.java

  Log Message:
  -----------
  Nitpicking. int << int then casting to long makes me uncomfortable.


  Commit: e0d38ec6f971ca1829eeed8ed3568b5fd912d017
      
https://github.com/jenkinsci/remoting/commit/e0d38ec6f971ca1829eeed8ed3568b5fd912d017
  Author: Kohsuke Kawaguchi <k...@kohsuke.org>
  Date:   2013-01-06 (Sun, 06 Jan 2013)

  Changed paths:
    M src/main/java/hudson/remoting/RemoteClassLoader.java

  Log Message:
  -----------
  doc improvement


  Commit: bcb886fefac65749d74b317f7528c3606dfc5748
      
https://github.com/jenkinsci/remoting/commit/bcb886fefac65749d74b317f7528c3606dfc5748
  Author: Kohsuke Kawaguchi <k...@kohsuke.org>
  Date:   2013-01-06 (Sun, 06 Jan 2013)

  Changed paths:
    M src/main/java/hudson/remoting/RemoteClassLoader.java

  Log Message:
  -----------
  this check is harmful.

remoteCapability.supportsPrefetch() is there to tell us if this side can call 
the fetch3 on the other side. Regardless of what the other side advertised, 
this side has already advertised the pre-fetch capability. So if the other side 
holds us to it, then we must deliver.


  Commit: e4274f6499f7740a71d56340cfd2c5d61a26927a
      
https://github.com/jenkinsci/remoting/commit/e4274f6499f7740a71d56340cfd2c5d61a26927a
  Author: Kohsuke Kawaguchi <k...@kohsuke.org>
  Date:   2013-01-06 (Sun, 06 Jan 2013)

  Changed paths:
    M src/main/java/hudson/remoting/RemoteClassLoader.java

  Log Message:
  -----------
  Prefetched class needs to be delivered to the classloader that's supposed to 
load it.

Imagine two classloaders P and C on the other side, where C delegates some of 
its classloading to P. On this side we got two remote classloaders Rp and Rc 
representing P and C respectively.

Now, imagine our loading Cc1 from Rc. Now, Cc1 actually depends on Cp1 that's 
loaded by P.

As a result of fetch3, we get [(Cc1,oid_Rc),(Cp1,oid_Rp)] as a return value. If 
we don't tell (Cp1,oid_Rp) to Rp, then someone trying to load Cp1 independently 
will not benefit from this prefetching. Therefore, we need to pass them to Rp 
eagerly.

(We still have to keep (Cp1,oid_Rp) in Rc as well so that Rp.loadClass(Cp1) 
will find what class file to load by which classloader.)

Note that the code behind "channel.importedClassLoaders.get(id)" seems awefully 
inefficient, as it creates a proxy only to look up a key. This probably needs 
to be improved.


Compare: 
https://github.com/jenkinsci/remoting/compare/1b1f25548a81...e4274f6499f7

Reply via email to