lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Dyer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-1549) SqlEntityProcessor does not recognize onError attribute
Date Fri, 31 Aug 2012 14:28:07 GMT

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

James Dyer commented on SOLR-1549:
----------------------------------

The patch looks simple and straightforward but I question the wisdom of allowing anything
else but "abort" in the case of an SqlException.  You can't simply continue and read the next
row of the query when this happens.  My thinking is "onAbort" is more for handling whole text
documents that for some reason don't parse correctly.

I guess if it was a child entity doing n+1 selects it could just go do the next select with
the following document.  Perhaps if the parent entity sometimes passes it a wrongly-typed
join value this would happen and it would be ok to go on, assuming the next doc would have
a correct join value?  But then again, you could just craft your sql to handle this contingency
in these cases.

So if Sascha, Alexander or anyone can explain better why this is a good idea, and possibly
contribute a unit test then perhaps we can commit this.  Otherwise I think its a "won't fix".
                
> SqlEntityProcessor does not recognize onError attribute
> -------------------------------------------------------
>
>                 Key: SOLR-1549
>                 URL: https://issues.apache.org/jira/browse/SOLR-1549
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4, 1.5
>            Reporter: Sascha Szott
>            Assignee: James Dyer
>            Priority: Minor
>         Attachments: SOLR-1549.patch
>
>
> Unfortunately, the SqlEntityProcessor does not recognize the value of an entity's onError
attribute in DIH's data config file. Therefore, in cases where SQL exceptions are thrown somewhere
inside the constructor of ResultSetIterators (which is an inner class of JdbcDataSource),
Solr's import exits immediately, even though onError is set to continue or skip.
> In my opinion, use cases exist that will profit from database related exception handling
inside of Solr (e.g., in cases where the existence of certain database tables or views is
not predictable).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message