Hi folks,
$subject. I've set AutoCommit to false in slave nodes, and AutoCheckout
true in master node. While I was debugging the code, it turned out that
even the slave node executes commit command. Yes, the sync task respects
the AutoCommit tag, but I'm seeing following code segment
in CarbonDeploymentSchedulerTask in org.wso2.carbon.core package, which
does a *commit **to determine whether the repo is changed or not.*
I'm probably seeing a bug, but I'm not sure why this hasn't been detected
all these months. But I'm seeing some issues because of this with the new
metadata files. Svnclient can determine the status can without doing a
commit.
Is there a reason for this?
private boolean doDeploymentSynchronization() {
if (log.isDebugEnabled()) {
log.debug("Running deployment synchronizer...");
}
boolean status = false;
BundleContext bundleContext =
CarbonCoreDataHolder.getInstance().getBundleContext();
ServiceReference reference =
bundleContext.getServiceReference(DeploymentSynchronizer.class.getName());
if (reference != null) {
ServiceTracker serviceTracker = new
ServiceTracker(bundleContext,
DeploymentSynchronizer.class.getName(),
null);
try {
serviceTracker.open();
for (Object obj : serviceTracker.getServices()) {
DeploymentSynchronizer depsync =
(DeploymentSynchronizer) obj;
if(!isInitialUpdateDone || isRepoUpdateFailed){
depsync.update(tenantId);
isInitialUpdateDone = true;
isRepoUpdateFailed = false;
}
* status = depsync.commit(tenantId);*
}
} catch (Exception e) {
log.error("Deployment synchronization for tenant " +
tenantId + " failed", e);
} finally {
serviceTracker.close();
}
}
return status;
}
Thanks,
--KasunG
--
*Kasun Gajasinghe*
Software Engineer; WSO2 Inc.; http://wso2.com
,
*email: **kasung AT spamfree wso2.com** cell: **+94 (77) 678-0813*
*linked-in: *http://lk.linkedin.com/in/gajasinghe*
*
*blog: **http://blog.kasunbg.org* <http://blog.kasunbg.org>
*
twitter: **http://twitter.com/kasunbg* <http://twitter.com/kasunbg>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev