Return-Path: X-Original-To: apmail-helix-user-archive@minotaur.apache.org Delivered-To: apmail-helix-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 71E6217BEC for ; Tue, 3 Mar 2015 16:12:09 +0000 (UTC) Received: (qmail 14692 invoked by uid 500); 3 Mar 2015 16:11:56 -0000 Delivered-To: apmail-helix-user-archive@helix.apache.org Received: (qmail 14653 invoked by uid 500); 3 Mar 2015 16:11:56 -0000 Mailing-List: contact user-help@helix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@helix.apache.org Delivered-To: mailing list user@helix.apache.org Received: (qmail 14642 invoked by uid 99); 3 Mar 2015 16:11:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Mar 2015 16:11:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vlad.gm@gmail.com designates 209.85.160.173 as permitted sender) Received: from [209.85.160.173] (HELO mail-yk0-f173.google.com) (209.85.160.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Mar 2015 16:11:51 +0000 Received: by ykr79 with SMTP id 79so476539ykr.7; Tue, 03 Mar 2015 08:09:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=05mILgEeqiWZw0XPtdSOvS/lEYqmNBlNJCfUdtuh+Eg=; b=GuSpUkfd62bT2oeeWRjCMkewjMSRUVmNvy7Ths9TC8FJ5zszrwXi7vY69pqDgyhQ0n 3gAs0xOTHV+O4t6BN9N6Rci/sub9k/4Ghdh8Jwp53jivCey9kl9bnuvvyap60hKC8mps ik9ZsBUkQm3eaDpr2eXg6Q69uxCz/UgXRHwsUZjDA6E9y1VhT1mu87o67OLnz2slYmMQ t2NYhuCgrWCCQD/qhn4QYnGerHTFrIZndHlDKI4ksw8dHV8zBhMlbQgoEgpAZ6CotwQI XzOJxOkjwhuxgFk1fsDry6+iz3EcYxOW80kr0poDwEk+RakoKrl3Yk3QjwTJvZfX9Tvf lX6g== MIME-Version: 1.0 X-Received: by 10.236.37.99 with SMTP id x63mr31637339yha.108.1425398955288; Tue, 03 Mar 2015 08:09:15 -0800 (PST) Received: by 10.170.65.138 with HTTP; Tue, 3 Mar 2015 08:09:14 -0800 (PST) Received: by 10.170.65.138 with HTTP; Tue, 3 Mar 2015 08:09:14 -0800 (PST) In-Reply-To: References: Date: Tue, 3 Mar 2015 08:09:14 -0800 Message-ID: Subject: Re: question about state transition From: "vlad.gm@gmail.com" To: user@helix.apache.org Cc: Development@helix.apache.org Content-Type: multipart/alternative; boundary=089e011848ec64add60510648e19 X-Virus-Checked: Checked by ClamAV on apache.org --089e011848ec64add60510648e19 Content-Type: text/plain; charset=UTF-8 We had the same issue. We created a state model like this: Offline -> Bootstrap -> Slave -> Master The heavy lifting is done in offline to bootstrap. The model has a constraint of one simultaneous transition per partition and we prioritize the transitions as follows: Slave to master Bootstrap to slave Offline to bootstrap All others There is at most one master and one slave. This will make the controller try to bring the higher ranked server all the way to slave before issuing the command for the lower ranked server to go to slave and then making the higher ranked server go to master. I not sure how to bridge the small gap without master, while keeping the single master target. Probably you could do without the bootstrap phase and do the heavy work in offline to slave, while keeping the other constraints Regards, Vlad On Mar 3, 2015 12:47 AM, "Gavin Li" wrote: > Hi, > > We have each server handle some partitions, and we use Master Slave model. > > We need to do some work when transit from offline to slave, sometimes it > takes long time. So when the server ranked higher in ideal state is up and > doing the work during the transition of offline to slave, the other server > is changed to slave from master. > > This is causing some period of time that there's no master at all which is > problematic. Is it possible to bring the other server down when the higher > rank server is transiting from slave to master instead of when transition > from offline to slave? > > THanks, > Gavin Li > --089e011848ec64add60510648e19 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

We had the same issue. We created a state model like this: Offline -> Bootstrap -> Slave -> Master

The heavy lifting is done in offline to bootstrap.

The model has a constraint of one simultaneous transition pe= r partition and we prioritize the transitions as follows:
Slave to master
Bootstrap to slave
Offline to bootstrap
All others

There is at most one master and one slave.

This will make the controller try to bring the higher ranked= server all the way to slave before issuing the command for the lower ranke= d server to go to slave and then making the higher ranked server go to mast= er. I=C2=A0 not sure how to bridge the small gap without master, while keep= ing the single master target.

Probably you could do without the bootstrap phase and do the= heavy work in offline to slave, while keeping the other constraints

Regards,
Vlad

On Mar 3, 2015 12:47 AM, "Gavin Li" &l= t;lyo.gavin@gmail.com> wrote:=
Hi= ,

We have each server handle some partitions, and we use= Master Slave model.

We need to do some work when = transit from offline to slave, sometimes it takes long time. So when the se= rver ranked higher in ideal state is up and doing the work during the trans= ition of offline to slave, the other server is changed to slave from master= .

This is causing some period of time that there&#= 39;s no master at all which is problematic. Is it possible to bring the oth= er server down when the higher rank server is transiting from slave to mast= er instead of when transition from offline to slave?

THanks,
Gavin Li
--089e011848ec64add60510648e19--