<div dir="ltr">Hi,<div><br></div><div style>I'm doing some testing with rabbitmq 3.1.5 .</div><div style>I don't know if I am doing something wrong or it is the normal behabiour, but, when I setup a 2 nodes cluster, both to disk and everytghing persistent, and withe the policy:</div>
<div style>rabbitmqctl set_policy  ha-all "^ha_" '{"ha-mode":"all"}'<br></div><div style><br></div><div style>The system does something I don't understand.</div><div style>If I create and send messages to a "ha_helloworld" queue those messages are sent to both nodes, and I can see how both nodes save those messages to disc as I can see how the "mnesia" directory grows.</div>
<div style>If I stop one of the nodes the space of "mnesia" in that node increase (?¿), but when I start it again it will just decrease and lose all messages.</div><div style><br></div><div style>Now, If I were to do the same with the second node, with the first node already restarted, the second node will just loose all messages to, so I will be losing all messages from the cluster.</div>
<div style><br></div><div style>I'll show the process at the end of the mail.</div><div style><br></div><div style>I don't know if this is the normal behabiour. I thougt that it is, as maybe it would be difficult to the server on the restarted node to know which messages has been already consumed while it was down. But if it is the case, why would anyone has a mirrored queue write to disk if all data can be lost anyway?</div>
<div style><br></div><div style>I already tryed to find info about this fact but without success...</div><div style><br></div><div style>Here the process of both nodes:</div><div style><br></div><div style><br></div><div style>
----------------------------------------------------------------------------------<br></div><div style><div>NODE 1</div><div>[root@ip-10-0-11-105 rabbitmq]# pwd</div><div>/var/lib/rabbitmq</div><div>[root@ip-10-0-11-105 rabbitmq]# du -hs *</div>
<div>1.4M<span class="" style="white-space:pre">        </span>erl_crash.dump</div><div>2.3M<span class="" style="white-space:pre"> </span>mnesia</div><div><br></div><div>(send some messages)</div><div><br></div><div>[root@ip-10-0-11-105 rabbitmq]# rabbitmqctl list_queues</div>
<div>Listing queues ...</div><div>ha_hello<span class="" style="white-space:pre">   </span>10000</div><div>...done.</div><div>[root@ip-10-0-11-105 rabbitmq]# du -hs *</div><div>1.4M<span class="" style="white-space:pre">    </span>erl_crash.dump</div>
<div>4.6M<span class="" style="white-space:pre">        </span>mnesia</div><div>[root@ip-10-0-11-105 rabbitmq]# /etc/init.d/rabbitmq-server stop</div><div>Stopping rabbitmq-server: rabbitmq-server.</div><div>[root@ip-10-0-11-105 rabbitmq]# du -hs *</div>
<div>1.4M<span class="" style="white-space:pre">        </span>erl_crash.dump</div><div>5.2M<span class="" style="white-space:pre"> </span>mnesia</div><div>[root@ip-10-0-11-105 rabbitmq]# /etc/init.d/rabbitmq-server start</div><div>
Starting rabbitmq-server: SUCCESS</div><div>rabbitmq-server.</div><div>[root@ip-10-0-11-105 rabbitmq]# du -hs *</div><div>1.4M<span class="" style="white-space:pre">     </span>erl_crash.dump</div><div>2.3M<span class="" style="white-space:pre"> </span>mnesia</div>
<div><br></div><div>(restart seccond node)</div><div><br></div><div>[root@ip-10-0-11-105 rabbitmq]#  rabbitmqctl list_queues</div><div>Listing queues ...</div><div>ha_hello<span class="" style="white-space:pre">    </span>0</div>
<div>...done.</div><div>[root@ip-10-0-11-105 rabbitmq]# du -hs *</div><div>1.4M<span class="" style="white-space:pre">  </span>erl_crash.dump</div><div>2.3M<span class="" style="white-space:pre"> </span>mnesia</div><div><br>
</div><div>----------------------------------------------------------------------------------</div><div><br></div><div style>NODE 2</div><div style><br></div><div style><div>[root@ip-10-0-10-175 rabbitmq]# pwd </div><div>
/var/lib/rabbitmq</div><div>[root@ip-10-0-10-175 rabbitmq]# du -hs *</div><div>1.2M<span class="" style="white-space:pre">    </span>erl_crash.dump</div><div>2.3M<span class="" style="white-space:pre"> </span>mnesia</div><div>
<br></div><div>(send some messages)</div><div><br></div><div>[root@ip-10-0-10-175 rabbitmq]# rabbitmqctl list_queues</div><div>Listing queues ...</div><div>ha_hello<span class="" style="white-space:pre">   </span>10000</div>
<div>...done.</div><div>[root@ip-10-0-10-175 rabbitmq]# du -hs *</div><div>1.2M<span class="" style="white-space:pre">  </span>erl_crash.dump</div><div>4.6M<span class="" style="white-space:pre"> </span>mnesia</div><div><br>
</div><div>(stop other node)</div><div><br></div><div>[root@ip-10-0-10-175 rabbitmq]# rabbitmqctl list_queues</div><div>Listing queues ...</div><div>ha_hello<span class="" style="white-space:pre">        </span>10000</div><div>...done.</div>
<div>[root@ip-10-0-10-175 rabbitmq]# du -hs *</div><div>1.2M<span class="" style="white-space:pre"> </span>erl_crash.dump</div><div>4.6M<span class="" style="white-space:pre"> </span>mnesia</div><div><br></div><div>[root@ip-10-0-10-175 rabbitmq]# /etc/init.d/rabbitmq-server stop</div>
<div>Stopping rabbitmq-server: rabbitmq-server.</div><div>[root@ip-10-0-10-175 rabbitmq]# du -hs *</div><div>1.2M<span class="" style="white-space:pre">        </span>erl_crash.dump</div><div>5.2M<span class="" style="white-space:pre"> </span>mnesia</div>
<div>[root@ip-10-0-10-175 rabbitmq]# /etc/init.d/rabbitmq-server start</div><div>Starting rabbitmq-server: SUCCESS</div><div>rabbitmq-server.</div><div>[root@ip-10-0-10-175 rabbitmq]# rabbitmqctl list_queues</div><div>Listing queues ...</div>
<div>ha_hello<span class="" style="white-space:pre">    </span>0</div><div>...done.</div><div>[root@ip-10-0-10-175 rabbitmq]# du -hs *</div><div>1.2M<span class="" style="white-space:pre">        </span>erl_crash.dump</div><div>2.3M<span class="" style="white-space:pre"> </span>mnesia</div>
<div><br></div><div>----------------------------------------------------------------------------------<br></div><div><br></div><div style>Thanks!</div><div><br></div></div><div style><br></div></div></div>