That’s exactly what I thought. The same could be said of Create and Create2. Yet, Create2Request was made.
-JZ On May 8, 2015 at 10:27:47 PM, Raúl Gutiérrez Segalés ([email protected]) wrote: On 8 May 2015 at 15:24, Jordan Zimmerman <[email protected]> wrote: > But that could’ve been done with just the new opcode of > ZooDefs.OpCode.create2, right? I need to understand if I need a new Request > class for the container feature or not. > Why would you need that for ZOOKEEPER-2163 if you'd just be using a bit from flags in CreateRequest: class CreateRequest { ustring path; buffer data; vector<org.apache.zookeeper.data.ACL> acl; int flags; } No new request type/class would be needed, no? Since you are just adding a new mode (CreateMode.CONTAINER). -rgs > -Jordan > > > > On May 8, 2015 at 4:58:37 PM, Patrick Hunt ([email protected]) wrote: > > Pretty sure that's why we did it that way. Otw old clients could have > issues. > > Patrick > > On Fri, May 8, 2015 at 9:40 AM, Chris Nauroth <[email protected]> > wrote: > > > Looking at "git blame zookeeper.jute", I traced the change back to > > ZOOKEEPER-1297 (add stat information to create call). Comments in the > > jira and corresponding Review Board request indicate that a new > > request/response pair was introduced in order to preserve backwards > > compatibility with existing clients. Although CreateRequest and > > Create2Request are the same, CreateResponse and Create2Response are > > different. It looks like new clients sending Create2Request would receive > > the new data, but old clients that still send CreateRequest would > continue > > to receive the old data, thus preserving compatibility. > > > > Disclaimer: I was not involved with any of this work. I'm just someone > > with a git log and a browser pointed at jira. :-) This does appear to be > > the rationale for Create2Request though. > > > > https://issues.apache.org/jira/browse/ZOOKEEPER-1297 > > > > > > https://reviews.apache.org/r/7283/ > > > > > > --Chris Nauroth > > > > > > > > > > On 5/8/15, 8:58 AM, "Jordan Zimmerman" <[email protected]> > wrote: > > > > >Why was it necessary to define the Create2Request class? It¹s exactly > the > > >same as CreateRequest. I¹m working on ZOOKEEPER-2163 and need to > > >understand the difference/need. > > > > > >-Jordan > > > > > > > > > > >
