From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Dillaman Subject: Re: blueprint: consistency groups Date: Wed, 11 May 2016 11:12:49 -0400 Message-ID: References: <20160325071933.GA14634@gmail.com> Reply-To: dillaman@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-pf0-f175.google.com ([209.85.192.175]:36007 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751391AbcEKPMu (ORCPT ); Wed, 11 May 2016 11:12:50 -0400 Received: by mail-pf0-f175.google.com with SMTP id c189so20380965pfb.3 for ; Wed, 11 May 2016 08:12:50 -0700 (PDT) In-Reply-To: Sender: ceph-devel-owner@vger.kernel.org List-ID: To: Victor Denisov Cc: Gregory Farnum , Mykola Golub , ceph-devel , Josh Durgin On Tue, May 10, 2016 at 12:25 PM, Victor Denisov wrote: > I was writing unit tests for create_cg function when I realized that > it wouldn't recover if we lost connection between > cls_client::dir_add_cg and create_cg object. If create_cg doesn't > happen then we are unable to repeat dir_add_cg. > However since I implemented create_cg operation after create_image > operation. create_image operation has the same issue. Correct - the recovery is to remove the image and re-create if you have a failure creating the image. I think that is a valid solution to the consistency groups as well. > So, my question is. Should I reimplement create_cg so that it can > recover from connection loss to the cluster or should I keep it the > same way create_image is implemented? There will not be an issue if the connection is lost -- there will only be an issue if the rbd CLI (or whatever else is using the librbd API) crashes / is stopped mid-operation. I am fine with matching the create_image behavior because there is a recovery path. > Also, what is more preferable big pull request for all components of > the feature - CRUD for consistency groups and snapshots, or split it > into smaller pull requests - first merge CRUD operations then > implement snapshots? Smaller patchsets are easier to review, test, and merge (especially as review comments are addressed). -- Jason