You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shawn Heisey (JIRA)" <ji...@apache.org> on 2014/04/09 20:42:24 UTC
[jira] [Created] (SOLR-5977) RunUpdateProcessor: Improve error
reporting for "appears to still contain Atomic document update operations"
Shawn Heisey created SOLR-5977:
----------------------------------
Summary: RunUpdateProcessor: Improve error reporting for "appears to still contain Atomic document update operations"
Key: SOLR-5977
URL: https://issues.apache.org/jira/browse/SOLR-5977
Project: Solr
Issue Type: Bug
Components: update
Affects Versions: 4.7.1
Reporter: Shawn Heisey
Assignee: Shawn Heisey
Priority: Minor
Fix For: 4.8, 5.0
When an object in an update request is an instance of Map, we assume that it is an atomic update. If it's not, DistributedUpdateProcessor will not do anything with it at all, which means that when RunUpdateProcessor is called, it will give the error message added by SOLR-4127.
The error message is perfectly fine if the request actually contains atomic update add/set/inc commands, but if the user is not doing Atomic Updates at all, they may be very confused. They may have included an object or the similar XML/JSON construct without realizing that it's incorrect.
I see two ways to handle it. I like the second, but we might want to consider both.
* Create a configuration element for DistributedUpdateProcessor that will log a warning when the key in the map is NOT add/set/inc or any other verbs we add to atomic updates. Default it to false, but set it to true in any update chain examples. Include comments indicating that it can be omitted or set to false if there are custom update components that utilize a Map object. One idea for the parameter name: warnOnInvalidAtomicUpdate
* Improve the error message.
** Create DistributedUpdateProcessor.containsMap().
** Use the new method in isAtomicUpdate(), which should only return true if the key is one of the atomic update actions.
** RunUpdateProcessor should return the current error message when isAtomicUpdate returns true, and a different error message when only containsMap() is true. We might want another method that will return the key value for the first Map found, to customize the error message.
--
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