You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2009/02/04 20:19:59 UTC

[jira] Updated: (ZOOKEEPER-246) review error code definition in both source and docs

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

Patrick Hunt updated ZOOKEEPER-246:
-----------------------------------

    Hadoop Flags: [Incompatible change, Reviewed]  (was: [Reviewed])

> review error code definition in both source and docs
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-246
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-246
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: c client, documentation, java client
>    Affects Versions: 3.0.0, 3.0.1
>            Reporter: Patrick Hunt
>            Assignee: Patrick Hunt
>            Priority: Minor
>             Fix For: 3.1.0
>
>         Attachments: ZOOKEEPER-246.patch, ZOOKEEPER-246.patch, ZOOKEEPER-246.patch
>
>
> A number of users have mentioned that our use of "calculated" values for error codes makes it very difficult to track error reports from the logs.  In both c/java we have:
> int ERROR = 100
> int X_ERROR= ERROR + 1
> int Y_ERROR= ERROR + 2
> etc...
> which makes it difficult to grep/search for "101" and find these references. A number of users have mentioned that having non-calculated values (ie X_ERROR=101) would make it easier. 
> I personally find calculated constants like this an anti-pattern.
> We should convert these values to non-calculated at a minimum, perhaps even redefine them as enums if possible.
> Also documentation, esp in the c code (the names btw c and java don't match btw) is lacking. We need to beef up docs in this area.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.