-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundles not reloading in smart bundle mode with debug off #51
Comments
I've added a fix in the following pull request: #60 |
Hi, Can you be more precise about the issue? I've seen that you're stopping the ressource watcher rebuild then restart it in your fix. Cheers, |
Good question, there's probably a better fix, but here's what I was seeing.
When the config changed, it reinitialized the JAWR context, but not the
watchers and listeners for resource changes. So when those
watchers/listeners see a dirty bundle, it tells the context to reload the
bundle. However, at that point the context has a different bundlesHandler
that doesn't know about the changes so it doesn't see anything to reload.
Perhaps the bundlesHandler shouldn't be passed directly into the resource
watcher and there should be some delegate in between?
This code in ConfigChangeListenerThread sees a bundle that needs to be
rebuilt because it was set to dirty in the JawrWatchEventProcessor logic.
else if (bundlesHandler != null && bundlesHandler.bundlesNeedToBeRebuild()) {
listener.rebuildDirtyBundles();
}
But the JawrRequestHandler doesn't see anything to rebuild in this code
@OverRide
public synchronized void rebuildDirtyBundles() {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Rebuild dirty bundles");
}
StopWatch stopWatch = new StopWatch();
ThreadLocalJawrContext.setStopWatch(stopWatch);
// Initialize the Thread local for the Jawr context
ThreadLocalJawrContext.setJawrConfigMgrObjectName(JmxUtils.getMBeanObjectName(servletContext,
resourceType,
jawrConfig.getProperty(JawrConstant.JAWR_JMX_MBEAN_PREFIX)));
try {
if (bundlesHandler != null) {
bundlesHandler.rebuildModifiedBundles();<<<<<<<<<<
}
because it's bundlesHandler was reinitialized and doesn't have bundles
that were marked dirty.
…On Sat, Jun 17, 2017 at 6:38 AM, Ibrahim Chaehoi ***@***.***> wrote:
Hi,
Can you be more precise about the issue?
What happened exactly?
I've seen that you're stopping the ressource watcher rebuild then restart
it in your fix.
What happens if a change occurs during the building process?
Cheers,
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVRZhEgAGPWXXwf73y3Yo2Vq6Jt_TDYks5sE6yZgaJpZM4N7mYW>
.
|
This issue is related as the erroneous config change detected is what caused things to become out of sync initially. If there were a real config change, you'd have the same issue. |
Hi, I've fixed the issue #58. Cheers, |
I'm out of the office today and I'll review on Monday.
…On Thu, Jul 13, 2017 at 1:59 PM, Ibrahim Chaehoi ***@***.***> wrote:
Hi,
I've fixed the issue #58
<#58>.
Could you make some tests with the latest version on the trunk and let me
know if you're still facing this issue?
Cheers,
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVRZvH-E9zopCgZgvHn6ScXpOa1Ew8tks5sNlrugaJpZM4N7mYW>
.
|
Hi, Have you been able to test the fix? Cheers, |
I'll have to sync back up with another co-worker. I've left the project
that was using JAWR so I don't have a good way to test myself.
…On Tue, Oct 24, 2017 at 4:18 PM, Ibrahim Chaehoi ***@***.***> wrote:
Hi,
Have you been able to test the fix?
Cheers,
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAVRZgOXTF2yktip24hwahATHMyVf4Euks5svkYvgaJpZM4N7mYW>
.
|
With the following properties and using JAWR Spring Controllers, modified resources are not properly reloading.
jawr.debug.on=false
jawr.use.smart.bundling=true
This seems to be due to an inconsistency between the resource watcher and the JawrRequestHandler that actually rebuilds the bundles.
The text was updated successfully, but these errors were encountered: