james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tellier Benoit (JIRA)" <server-...@james.apache.org>
Subject [jira] [Closed] (JAMES-2282) Some Cassandra DAOs are not bound in Singleton scope
Date Fri, 26 Jan 2018 12:43:00 GMT

     [ https://issues.apache.org/jira/browse/JAMES-2282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tellier Benoit closed JAMES-2282.
---------------------------------

> Some Cassandra DAOs are not bound in Singleton scope
> ----------------------------------------------------
>
>                 Key: JAMES-2282
>                 URL: https://issues.apache.org/jira/browse/JAMES-2282
>             Project: James Server
>          Issue Type: Bug
>          Components: cassandra, guice
>    Affects Versions: master
>            Reporter: Tellier Benoit
>            Priority: Minor
>
> We encounter some log lines like:
> {code}
> Re-preparing already prepared query is generally an anti-pattern and will likely affect
performance. Consider preparing the statement only once. Query='UPDATE mailboxCounters SET
unseen=unseen-1 WHERE mailboxId=:mailboxId;'
> Re-preparing already prepared query is generally an anti-pattern and will likely affect
performance. Consider preparing the statement only once. Query='UPDATE mailboxCounters SET
count=count-1 WHERE mailboxId=:mailboxId;'
> Re-preparing already prepared query is generally an anti-pattern and will likely affect
performance. Consider preparing the statement only once. Query='UPDATE mailboxCounters SET
unseen=unseen+1 WHERE mailboxId=:mailboxId;'
> Re-preparing already prepared query is generally an anti-pattern and will likely affect
performance. Consider preparing the statement only once. Query='INSERT INTO mailbox (id,name,uidvalidity,mailboxbase)
VALUES (:id,:name,:uidvalidity,:mailboxbase);'
> {code}
> These DAOs are created every time they are injected by Guice, which leads to re-preparing
queries.
> We should rather bind them in scope singleton.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message