[
https://issues.apache.org/jira/browse/SENTRY-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16101862#comment-16101862
]
Alexander Kolbasov commented on SENTRY-1867:
--------------------------------------------
The message comes from {{ForwardQueryResult#closingConnection()}}:
{code}
if (loadResultsAtCommit && isOpen() && moreResultSetRows)
{
// Query connection closing message
NucleusLogger.QUERY.info(LOCALISER.msg("052606", query.toString()));
try
{
// If we are still open navigate to the end of the ResultSet
before it gets closed
advanceToEndOfResultSet();
}
catch (RuntimeException re)
{
if (re instanceof NucleusUserException)
{
// TODO Localise this message
// Log any exception - can get exceptions when maybe the
user has specified an invalid result class etc
NucleusLogger.QUERY.warn("Exception thrown while loading
remaining rows of query : " + re.getMessage());
}
else
{
throw
query.getExecutionContext().getApiAdapter().getUserExceptionForException(
"Exception thrown while loading remaining rows of
query", re);
}
}
}
}
{code}
This is controlled by {{datanucleus.query.loadResultsAtCommit}} property. Here
is the description:
{code}
Large Result Sets : Loading Results at Commit()
When a transaction is committed by default all remaining results for a query
are loaded so that the query is usable thereafter. With a large result set you
clearly don't want this to happen. So in this case you should set the extension
datanucleus.query.loadResultsAtCommit to false.
To do this on a per query basis for JDO you would do
query.addExtension("datanucleus.query.loadResultsAtCommit", "false");
To do this on a per query basis for JPA you would do
query.setHint("datanucleus.query.loadResultsAtCommit", "false");
{code}
I think that we don't need this and can safely set it to false.
> DataNucleus.Query INFO level logging spams Sentry log files
> -----------------------------------------------------------
>
> Key: SENTRY-1867
> URL: https://issues.apache.org/jira/browse/SENTRY-1867
> Project: Sentry
> Issue Type: Improvement
> Components: Sentry
> Affects Versions: 1.8.0, 2.0.0
> Reporter: Arjun Mishra
> Assignee: Arjun Mishra
> Fix For: 1.8.0, 2.0.0
>
> Attachments: SENTRY-1867.01.patch,
> SENTRY-1867.01-sentry-ha-redesign.patch
>
>
> In the Sentry service, DataNucleus.Query property, when not defined in
> log4j.properties file, is by default set to INFO. This floods the log files
> with INFO level logs every few seconds. We should set the default value to
> WARN to avoid this, unless until specified in the log4j.properties file
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)