Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper, mail # user - Odd error naming… NotReadOnly when the server *is* read-only


+
Ben Bangert 2012-09-07, 17:07
+
Henry Robinson 2012-09-11, 17:28
Copy link to this message
-
Re: Odd error naming… NotReadOnly when the server *is* read-only
Ben Bangert 2012-09-13, 17:47
On Sep 11, 2012, at 10:28 AM, Henry Robinson <[EMAIL PROTECTED]> 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