You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2014/03/29 09:38:16 UTC

[jira] [Commented] (SOLR-5932) DIH: retry query on "terminating connection due to conflict with recovery"

    [ https://issues.apache.org/jira/browse/SOLR-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13951809#comment-13951809 ] 

Shalin Shekhar Mangar commented on SOLR-5932:
---------------------------------------------

What you say makes sense but I don't see a way to do this without specializing the exception handling for PostgreSQL. I'm not sure if we want to do that. Do you have a suggestion?

Alternately, I think you can try tuning the batchSize for your JdbcDataSource. The default is 500 rows per entity which may be too high for you?

> DIH: retry query on "terminating connection due to conflict with recovery"
> --------------------------------------------------------------------------
>
>                 Key: SOLR-5932
>                 URL: https://issues.apache.org/jira/browse/SOLR-5932
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - DataImportHandler
>    Affects Versions: 4.7
>            Reporter: Gunnlaugur Thor Briem
>            Priority: Minor
>
> When running DIH against a hot-standby PostgreSQL database, one may randomly see queries fail with this error:
> {code}
> org.apache.solr.handler.dataimport.DataImportHandlerException: org.postgresql.util.PSQLException: FATAL: terminating connection due to conflict with recovery
>   Detail: User query might have needed to see row versions that must be removed.
>   Hint: In a moment you should be able to reconnect to the database and repeat your command.
> {code}
> A reasonable course of action in this case is to catch the error and retry. This would support the use case of doing an initial (possibly lengthy) clean full-import against a hot-standby server, and then just running incremental dataimports against the master.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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