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

Sijie Guo commented on BOOKKEEPER-582:
--------------------------------------

sorry for late response.

{quote}
About the use of enum for errors, I was checking the code and the valueOf 
method it produces has a default value, which is null. I haven't actually 
checked.
{quote}

to be fair and clear, I wrote a simple program for protobuf enum. 
https://github.com/sijie/protobuf-enum . in the example, PB1 (old protocol) 
will throw exception on decoding PB2 (new protocol with new enum value). for 
enums in requests, server with old protocol doesn't know new protocol (e.g. new 
request type), it would catch the exceptions and treat is as unknown requests. 
for enums in responses, as I mentioned, I don't like to swallow the status 
codes introduced in different protocols, server will only respond corresponding 
status code the known by given version.

{quote}
I actually like the way the patch is done. I also prefer to use enums rather 
than booleans. I agree though that it would be nice to send a bit vector of 
flags rather than a single enum to avoid the combinatorial explosion.
{quote}

in zookeeper, EPHEMERAL / EPHEMERAL_SEQUENTIAL / PERSISTENT / 
PERSISTENT_SEQUENTIAL are used for representing create mode. what do you think 
about this? does it introduce any troubles in zookeeper for extension or 
maintenance? 

{quote}
"packet-level errors" from "app-level errors"
{quote}

the packet-level error isn't as what you described for server errors. the 
packet-level errors are same as app-level errors, which are used to represent 
the common failures of individual requests inside a package. e.g. a 
AUTH_FAILURE request means all requests failed with AUTH_FAILURE, a NO_LEDGER 
batch read means all requests underlying failed with NO_LEDGER, a SUCCESS batch 
read with some SUCCESS entries and some NO_ENTRY entries (due to stripping).

The usage here is quite similar as how ZooKeeper Transaction batch zookeeper 
requests without transaction semantic.










> Make bookie and client use protobuf for requests (non-wire part)
> ----------------------------------------------------------------
>
>                 Key: BOOKKEEPER-582
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-582
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-client, bookkeeper-server
>            Reporter: Ivan Kelly
>            Assignee: Aniruddha
>             Fix For: 4.3.0
>
>         Attachments: 
> 0002-BOOKKEEPER-582-Make-bookie-and-client-use-protobuf-f.patch, 
> 0002-BOOKKEEPER-582-Make-bookie-and-client-use-protobuf-f.patch, 
> 0002-BOOKKEEPER-582-Make-bookie-and-client-use-protobuf-f.patch, 
> 0003-BOOKKEEPER-582-Make-bookie-and-client-use-protobuf-f.patch, 
> BOOKKEEPER-582.diff, BOOKKEEPER-582.v2.diff, BOOKKEEPER-582.v3.diff
>
>
> Make the client and the bookie use protobufs internally. This is the first 
> step to using protobufs on the wire, but for the moment, BookieRequestHandler 
> decodes the old wire protocol into the protobuf messages. Once this is in, 
> enabling on the wire will be very simple, and the old manual serialization 
> can be made "legacy" (still supported, but deprecated).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to