Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

TOA: bugfix in the previous pull request #75

Merged
merged 1 commit into from

1 participant

@pruivo
Collaborator

No description provided.

@pruivo pruivo bugfix introduced by JGRP-1597
added local node address to total order delivered thread (TOA)
an empty AnycastAddress means envolves all the members
1a3be67
@pruivo pruivo merged commit 81591ff into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 21, 2013
  1. @pruivo

    bugfix introduced by JGRP-1597

    pruivo authored
    added local node address to total order delivered thread (TOA)
    an empty AnycastAddress means envolves all the members
This page is out of date. Refresh to see the latest.
View
2  src/org/jgroups/protocols/tom/DeliveryManagerImpl.java
@@ -114,7 +114,7 @@ public final void removeLeavers(Collection<Address> leavers) {
}
}
deliverySet.removeAll(toRemove);
- if (deliverySet.first().isReadyToDeliver()) {
+ if (!deliverySet.isEmpty() && deliverySet.first().isReadyToDeliver()) {
deliverySet.notify();
}
}
View
4 src/org/jgroups/protocols/tom/DeliveryThread.java
@@ -32,6 +32,10 @@ public void start(DeliveryManager deliveryManager) {
start();
}
+ public void setLocalAddress(String localAddress) {
+ setName("TOA-Delivery-Thread-" + localAddress);
+ }
+
@Override
public void start() {
if (deliveryManager == null) {
View
7 src/org/jgroups/protocols/tom/TOA.java
@@ -68,6 +68,7 @@ public Object down(Event evt) {
return null;
case Event.SET_LOCAL_ADDRESS:
this.localAddress = (Address) evt.getArg();
+ this.deliverThread.setLocalAddress(localAddress.toString());
break;
case Event.VIEW_CHANGE:
handleViewChange((View) evt.getArg());
@@ -115,6 +116,7 @@ public Object up(Event evt) {
break;
case Event.SET_LOCAL_ADDRESS:
this.localAddress = (Address) evt.getArg();
+ this.deliverThread.setLocalAddress(localAddress.toString());
break;
default:
break;
@@ -210,10 +212,7 @@ private void sendTotalOrderAnycastMessage(Collection<Address> destinations, Mess
}
if (destinations.isEmpty()) {
- if (warn) {
- log.warn("sending an anycast with an empty list");
- }
- throw new IllegalStateException("AnycastAddress must have at least one element");
+ destinations.addAll(currentView.getMembers());
}
if (destinations.size() == 1) {
Something went wrong with that request. Please try again.