Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CCBA810CB0 for ; Tue, 4 Nov 2014 16:44:22 +0000 (UTC) Received: (qmail 69250 invoked by uid 500); 4 Nov 2014 16:44:22 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 69199 invoked by uid 500); 4 Nov 2014 16:44:22 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 69187 invoked by uid 99); 4 Nov 2014 16:44:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Nov 2014 16:44:21 +0000 X-ASF-Spam-Status: No, hits=4.9 required=5.0 tests=GUARANTEED_100_PERCENT,SPF_HELO_PASS,SPF_NEUTRAL,URI_HEX,URI_TRY_3LD X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [162.253.133.43] (HELO mwork.nabble.com) (162.253.133.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Nov 2014 16:43:55 +0000 Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id 60BA690C19C for ; Tue, 4 Nov 2014 08:43:52 -0800 (PST) Date: Tue, 4 Nov 2014 08:39:39 -0800 (PST) From: tbain98 To: users@activemq.apache.org Message-ID: <1415119179596-4686937.post@n4.nabble.com> In-Reply-To: <1415110800800-4686931.post@n4.nabble.com> References: <1415110800800-4686931.post@n4.nabble.com> Subject: Re: Replicated LevelDB : Manually copying data from one leveldb store to another MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I've never used LevelDB, but I'd be concerned about what you're proposing (copying the files that back a database while that database is running) no matter what the database technology was. If you're copying from the master while it's active, then the master could be writing to its files while you're doing your copy, and I doubt that anyone will tell you it's 100% guaranteed that you won't get an inconsistent copy of the files. Most of the time you'll probably be fine, but I'd bet that there are race conditions where you wouldn't be, so you're probably rolling the dice each time you do it. So for the process you've described, the answer is almost certainly "don't do it, because you can't guarantee atomicity of your copy operation and/or synchronization with the database's write operations". I would expect better odds if you shut down the master and then copy its files, since then you know it's not writing to them as you copy them over, but that may or may not accomplish your goal. (You haven't said what that goal is, or why you can't just restart the slave with its existing LevelDB database, so I can't speculate on what you're actually trying to do.) But again, I'm not a LevelDB expert and it doesn't seem like there are many of them on this mailing list, so since you want answers about the inner workings of LevelDB, you might want to post those questions on the LevelDB mailing list instead. khandelwalanuj wrote > Hi, > > Is it possible to copy data from leveldb store of one broker to another > broker while using replicated leveldb. > > For ex. : Let's say 3 brokers are running fine and replicating the data. I > suddenly stop one slave broker. After some time before starting the slave > Can I manually copy leveldb directory of master and then start the slave ? > (I am copying each and every file other than the nodeid.txt) > > In my test setup it is working fine but not sure if it will fail in some > corner cases. Let me know if some issues are there with this. > > > Thanks, > Anuj -- View this message in context: http://activemq.2283324.n4.nabble.com/Replicated-LevelDB-Manually-copying-data-from-one-leveldb-store-to-another-tp4686931p4686937.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.