Issue Details (XML | Word | Printable)

Key: COMMUNITY_EQUITY-486
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: DmitryRyashchentsev
Reporter: PRE
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
community-equity
COMMUNITY_EQUITY-444

implement daily caching

Created: 23/Apr/10 08:43 AM   Updated: 31/May/10 01:45 PM   Resolved: 24/May/10 09:57 AM
Component/s: None
Affects Version/s: None
Fix Version/s: Milestone 1.4

Time Tracking:
Not Specified

File Attachments: 1. File log (1.46 MB) 07/May/10 07:03 PM - PRE


Tags:


PRE added a comment - 23/Apr/10 08:44 AM - edited

Project: community-equity
Repository: svn
Revision: 566
Author: DmitryRyashchentsev
Date: 2010-04-21 03:33:40 UTC
Link:

Log Message:
------------
COMMUNITY_EQUITY-444 provided time boundary statistics collection for info IQ and PQ and person PQ

Revisions:
----------
566


PRE added a comment - 23/Apr/10 08:45 AM

Project: community-equity
Repository: svn
Revision: 565
Author: DmitryRyashchentsev
Date: 2010-04-20 06:39:33 UTC
Link:

Log Message:
------------
COMMUNITY_EQUITY-444 provided info stat query and web service control to generate statistics calculation

Revisions:
----------
565


PRE added a comment - 03/May/10 11:57 AM

getting enclosed error when recalculating statistics

Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
Error Code: 1205
Call: UPDATE TAG_CEQ SET TQB = (TQB + ?), TQ = (TQ + ?), TQK = (TQK + ?), USAGE_COUNT = (USAGE_COUNT + ?) WHERE (ID = ?)
bind => [8394, 1.0, 6, 0, 20]
Query: UpdateAllQuery()
at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:311)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:654)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:703)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:492)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:452)
at oracle.toplink.essentials.internal.sessions.AbstractSession.executeCall(AbstractSession.java:690)
at oracle.toplink.essentials.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:150)
at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:214)
at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeNoSelectCall(DatasourceCallQueryMechanism.java:257)
at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.updateAll(DatasourceCallQueryMechanism.java:728)
at oracle.toplink.essentials.queryframework.UpdateAllQuery.executeDatabaseQuery(UpdateAllQuery.java:180)
at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
at oracle.toplink.essentials.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:555)
at oracle.toplink.essentials.queryframework.ModifyAllQuery.executeInUnitOfWork(ModifyAllQuery.java:168)
at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2248)
at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:924)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.executeUpdate(EJBQueryImpl.java:397)
at com.sun.ceq.math.model.LinearModelImpl.applyTagTQ(LinearModelImpl.java:234)
at com.sun.ceq.math.model.LinearModelImpl.applyCQ(LinearModelImpl.java:211)
at com.sun.ceq.math.model.LinearModelImpl.processAction(LinearModelImpl.java:421)
at com.sun.ceq.math.model.LinearModelImpl.processAction(LinearModelImpl.java:128)
at com.sun.ceq.math.model.DataManipulatorImpl.processAction(DataManipulatorImpl.java:225)
at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2920)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4011)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
at $Proxy60.processAction(Unknown Source)
at com.sun.ceq.math.model.ProcessBean.processMessage(ProcessBean.java:90)
at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2920)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4011)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
at $Proxy64.processMessage(Unknown Source)
at com.sun.ceq.math.model.DataManipulatorMessageConsumerBean.processQueue(DataManipulatorMessageConsumerBean.java:111)
at com.sun.ceq.math.model.DataManipulatorMessageConsumerBean.onMessage(DataManipulatorMessageConsumerBean.java:85)
at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2920)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4011)
at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:1111)
at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:74)
at com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:179)
at $Proxy97.onMessage(Unknown Source)
at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:258)
at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:76)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2046)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1964)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1949)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:647)
... 59 more
EJB5018: An exception was thrown during an ejb invocation on [DataManipulatorImpl]
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
Error Code: 1205
Call: UPDATE TAG_CEQ SET TQB = (TQB + ?), TQ = (TQ + ?), TQK = (TQK + ?), USAGE_COUNT = (USAGE_COUNT + ?) WHERE (ID = ?)
bind => [8394, 1.0, 6, 0, 20]
Query: UpdateAllQuery()
Local Exception Stack:
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
Error Code: 1205
Call: UPDATE TAG_CEQ SET TQB = (TQB + ?), TQ = (TQ + ?), TQK = (TQK + ?), USAGE_COUNT = (USAGE_COUNT + ?) WHERE (ID = ?)
bind => [8394, 1.0, 6, 0, 20]
Query: UpdateAllQuery()
at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:311)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:654)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:703)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:492)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:452)
at oracle.toplink.essentials.internal.sessions.AbstractSession.executeCall(AbstractSession.java:690)
at oracle.toplink.essentials.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:150)
at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:214)
at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeNoSelectCall(DatasourceCallQueryMechanism.java:257)
at o


DmitryRyashchentsev added a comment - 06/May/10 11:23 AM

Hm. That means that more then 1 async tasks are executed in the same time


PRE added a comment - 07/May/10 02:47 PM

Could it be that it caused because I started the aging task twice ?


DmitryRyashchentsev added a comment - 07/May/10 02:54 PM

That should not be a problem


PRE added a comment - 07/May/10 07:03 PM

Attach logfile with DB connection errors - still happens with latest version


PRE added a comment - 10/May/10 05:03 PM

found this error message - need to check if still exist in latest version

at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:77)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
Caused by: Exception [TOPLINK-8024] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.EJBQLException
Exception Description: Syntax error parsing the query [SELECT info.nID, SUM(at.nPointsIQ) SUM(at.nPointsPQ) FROM ActionTypeCEQ at, Log log, InformationCEQ info WHERE log.m_dateEvent >= :FROM AND log.m_dateEvent < :TO AND log.m_nObjectID = info.nID AND log.m_nActionTypeID = at.nActionTypeID AND at.nInfoTypeID = info.nInfoTypeID GROUP BY info.nID], line 1, column 48: syntax error at [SUM].
Internal Exception: line 1:48: expecting "from", found 'SUM'
at oracle.toplink.essentials.exceptions.EJBQLException.syntaxErrorAt(EJBQLException.java:379)
at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.handleANTLRException(EJBQLParser.java:335)
at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.addError(EJBQLParser.java:278)
at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.reportError(EJBQLParser.java:378)
at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.fromClause(EJBQLParser.java:488)
at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.selectStatement(EJBQLParser.java:179)
at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.document(EJBQLParser.java:135)
at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.parse(EJBQLParser.java:166)
at oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser.buildParseTree(EJBQLParser.java:127)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:215)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:189)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:153)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:114)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.<init>(EJBQueryImpl.java:99)
at oracle.toplink.essentials.internal.ejb.cmp3.EJBQueryImpl.<init>(EJBQueryImpl.java:86)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:204)
... 41 more
Caused by: line 1:48: expecting "from", found 'SUM'
at persistence.antlr.Parser.match(Parser.java:212)
at oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.fromClause(EJBQLParser.java:453)
... 52 more
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: An exception occured while creating a query in EntityManager


DmitryRyashchentsev added a comment - 11/May/10 07:47 AM

It is not in latest version


DmitryRyashchentsev added a comment - 11/May/10 09:36 PM

Peter,
I have 2 questions on statistics collection:

1. Should cancelled controlled action be in the statistics? I.e. if I rate the same document dayly, should statistic count all this activity or only latest one?

2. If we cancel some activity in Admin Interface, should it not be counted in the statistics (remove) as like?

Thanks.


PRE added a comment - 12/May/10 09:39 AM

1. Should cancelled controlled action be in the statistics? I.e. if I rate the same document dayly, should statistic count all this activity or only latest one?

NO

2. If we cancel some activity in Admin Interface, should it not be counted in the statistics (remove) as like?

NO - it should not be recalculated for the past


DmitryRyashchentsev added a comment - 12/May/10 11:52 AM

The general idea for this release is - no statistics recalculation because of action canceling ( canceling of controlled action, canceling by admin UI, by blocking rule ).

But if an action is cancelled (as controlled action, by admin UI, or blocking rule) before statistics is calculated (for today's activity) - this canceling should be counted.

Right?


DmitryRyashchentsev added a comment - 24/May/10 09:57 AM

The 1st version of statistics calculation and caching is implemented.
The follopwing update will be needed in the follow releases:
COMMUNITY_EQUITY-490 Limit tags list for statistics calculation
COMMUNITY_EQUITY-491 Time bound statistics cahing UI