zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Bangert <...@groovie.org>
Subject Re: Odd error naming… NotReadOnly when the server *is* read-only
Date Thu, 13 Sep 2012 17:47:46 GMT
On Sep 11, 2012, at 10:28 AM, Henry Robinson <henry@cloudera.com> wrote:

> What do you think a good exception name would be? (Or do you think an
> exception is the wrong error path here?)

Given that the other errors all reflect what specifically is responsible for the error given
the servers state, I was expecting an error like:
ServerIsReadOnly

Which clearly indicates the call failed because the server is read-only. The concept of "read-only
commands" is kind of strange, which is what the current NotReadOnly exception refers to (the
call itself is not a read-only call). ServerIsReadOnly fits into the current scheme of:
Command X failed due to condition Y on the server.

> My view is that the exception is badly named, and should indicate the
> actual error, like NodeNotWriteable or similar. It is, unfortunately, hard
> to make these changes in minor releases though, although I think we could
> consider it for 3.5.

Makes sense.

Cheers,
Ben
Mime
View raw message