On Mon, Apr 23, 2012 at 10:31 AM, Hiranya Jayathilaka <[email protected]>wrote:
> It looks like this task impl does not take the autoCommit flag into > account. > Yes, it seems status should be false if autoCommit flag is set to false. So, do you think wrapping "status = depsync.commit(tenantId)" with a condition of autoCommit would fix this problem? This task is generally used in SLive where all the nodes are in autoCommit > mode. So not a problem in that environment. Azeez should be able to explain > more. > > This explains why this issue hasn't been detected I guess. Thanks, --KasunG Thanks, > Hiranya > > On Sun, Apr 22, 2012 at 10:39 PM, Kasun Gajasinghe <[email protected]>wrote: > >> 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 >> >> > > > -- > Hiranya Jayathilaka > Associate Technical Lead; > WSO2 Inc.; http://wso2.org > E-mail: [email protected]; Mobile: +94 77 633 3491 > Blog: http://techfeast-hiranya.blogspot.com > -- *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
