mirror of https://github.com/jenkinsci/jenkins.git
[JENKINS-16341] Pick up `BoundObjectTable` fix (#11086)
This commit is contained in:
parent
a645acb6ac
commit
1bae0f30f6
|
@ -41,7 +41,7 @@ THE SOFTWARE.
|
|||
<commons-fileupload2.version>2.0.0-M4</commons-fileupload2.version>
|
||||
<groovy.version>2.4.21</groovy.version>
|
||||
<jelly.version>1.1-jenkins-20250731</jelly.version>
|
||||
<stapler.version>2033.va_95221851a_23</stapler.version>
|
||||
<stapler.version>2036.v69a_e0454da_b_9</stapler.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
|
|
|
@ -134,7 +134,7 @@ public abstract class ProgressiveRendering {
|
|||
((ScheduledExecutorService) executorService).schedule(new Runnable() {
|
||||
@Override public void run() {
|
||||
LOG.log(Level.FINE, "some time has elapsed since {0} finished, so releasing", boundId);
|
||||
release();
|
||||
boundObjectTable.release(boundId);
|
||||
}
|
||||
}, timeout() /* add some grace period for browser/network overhead */ * 2, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
@ -142,17 +142,6 @@ public abstract class ProgressiveRendering {
|
|||
});
|
||||
}
|
||||
|
||||
/** {@link BoundObjectTable#releaseMe} just cannot work the way we need it to. */
|
||||
private void release() {
|
||||
try {
|
||||
Method release = BoundObjectTable.Table.class.getDeclaredMethod("release", String.class);
|
||||
release.setAccessible(true);
|
||||
release.invoke(boundObjectTable, boundId);
|
||||
} catch (Exception x) {
|
||||
LOG.log(Level.WARNING, "failed to unbind " + boundId, x);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies important fields from the current HTTP request and makes them available during {@link #compute}.
|
||||
* This is necessary because some model methods such as {@link AbstractItem#getUrl} behave differently when called from a request.
|
||||
|
@ -281,7 +270,7 @@ public abstract class ProgressiveRendering {
|
|||
r.put("status", statusJSON);
|
||||
if (statusJSON instanceof String) { // somehow completed
|
||||
LOG.log(Level.FINE, "finished in news so releasing {0}", boundId);
|
||||
release();
|
||||
boundObjectTable.release(boundId);
|
||||
}
|
||||
lastNewsTime = System.currentTimeMillis();
|
||||
LOG.log(Level.FINER, "news from {0}", uri);
|
||||
|
|
Loading…
Reference in New Issue