Skip to content
Browse files

- Updated release notes

- Fixed test failure due to https://issues.jboss.org/browse/JGRP-1330
  • Loading branch information...
1 parent edeac31 commit b12d4209b522f410293b83f2b789ae6f4173c2b4 @belaban committed
View
6 doc/API_Changes.txt
@@ -6,9 +6,7 @@ API changes in 3.0.0
- Removed package org.jgroups.persistence and changed dependent demos accordingly (e.g. ReplicatedHashMap)
-- Removed all options except for Channel.LOCAL
-- Removed JChannel.getOpt()/setOpt()
-- Discarding of own messages can now be set via setDiscardOwnMessages(true)
+- Removed all options (JChannel.getOpt()/setOpt()), discarding of own messages can now be set via setDiscardOwnMessages(true)
- Removed package org.jgroups.mux (e.g. Multiplexer and MuxChannel). Use a shared transport instead. If you have to,
use classes from package org.jgroups.blocks.mux (only if you're an expert though !)
@@ -16,7 +14,7 @@ API changes in 3.0.0
- Removed (J)ChannelFactory. Inject the channel yourself, e.g. through CDI
- Removed JChannel.receive(). Use a Receiver or ReceiverAdapter and JChannel.setReceiver(Receiver) to switch from a
- pull based approach of receiving messages to a push-based approach
+ pull based approach of receiving messages to a push based approach
- Removed JChannel.receive(), peek(), shutdown(), open(), returnState(), getAllStates(), blockOK()
View
16 doc/RELEASE_INSTRUCTIONS
@@ -3,7 +3,7 @@
---------------------------------------
Pre-release:
-- Do a cvs update -dP and commit all pending changes
+- Do a git pull origin master and commit all pending changes
- Run all unit tests: ./build clean all-tests reports
- Run the manual tests in doc/tests/ManualTests.txt
- Run the performance tests to see whether performance is about the same
@@ -12,20 +12,16 @@ Pre-release:
Release:
- Update the ReleaseNotes-xxx.txt for the given release
-- Set version in: Version.java, manifest.mf, build.xml and pom.xml
+- Set version in: Version.java, build.xml and pom.xml
* Note that the version needs to conform to the version standards, e.g. 2.6.2.GA or 2.6.4.CR2, 2.5.4.Beta1
-- Create a CVS tag: JGroups_x_y_z
-- Add tag information to wiki: http://wiki.jboss.org/wiki/Wiki.jsp?page=Branches
+- Create a Git tag: JGroups_x_y_z
- Create a distribution: ./build.sh jar
- - the distribution files are dist/jgroups-x.y.z.jar, dist/jgroups-sources.jar
+ - the distribution files are dist/jgroups-x.y.z.jar, dist/jgroups-sources.jar and dist/README
- Upload distribution files to web site:
- - Go to http://sourceforge.net/projects/javagroups/
- - Log in and pick http://sourceforge.net/project/admin/editpackages.php?group_id=6081
- - Add release to JGroups (new version)
- - Release notes are included in dist, change log obtained from JIRA
+ - Go to http://sourceforge.net/projects/javagroups/files/ (requires admin)
- Create PDF and HTML documentation: ./build.sh docs and upload to web site
- these files update the JGroups web page (http://www.jgroups.org/javagroupsnew/docs/index.html),
- specifically the links to manual and tutorial documentation
+ specifically the links to manual and tutorial documentation
- see JGroups/bin/upload_manual.sh
- Create javadoc: ./build.sh javadoc and upload to web site
- use process similar to pdf and html (script is bin/upload_javadocs.sh)
View
40 doc/ReleaseNotes-3.0.0.txt
@@ -29,7 +29,7 @@ API changes
Not really a feature, however, this impacts application code using JGroups; some code will have to be changed as we
implemented a lot of the API changes we've always wanted to do, but couldn't due to backwards compatibility reasons.
API changes have really been the focus of 3.0; some work also went into optimizations for running in large clusters.
-More optimization work will be done in 3.1.
+More optimization work will be done in 3.0.x and 3.1.
The changes are described in https://github.com/belaban/JGroups/blob/master/doc/API_Changes.txt.
@@ -41,6 +41,28 @@ The is a cluster wide atomic counter, for details see the documentation at
http://www.jgroups.org/manual-3.x/html/user-building-blocks.html#CounterService
+JChannel: input stream constructor
+----------------------------------
+[https://issues.jboss.org/browse/JGRP-1349]
+
+A new JChannel can now be created by passing it an input stream to a config.
+
+
+UNICAST / UNICAST2: close idle connections
+------------------------------------------
+[https://issues.jboss.org/browse/JGRP-1384]
+
+Added property conn_expiry_timeout which closes idle connections after this timeout. Useful in large clusters, to
+reduce memory (each connection has a retransmit table).
+
+
+Add support for Amazon EC2 inter-region nodes (NAT support)
+-----------------------------------------------------------
+[https://issues.jboss.org/browse/JGRP-1388]
+
+Added external_addr to UDP, FD_SOCK and STATE_SOCK. This allows nodes behind a NAT to be accessed from other members.
+
+
Optimizations
@@ -68,6 +90,13 @@ The view is now omitted from the discovery response, this causes large messages
especially if we had a large cluster
+Make merging more scalable / robust
+-----------------------------------
+[https://issues.jboss.org/browse/JGRP-1379]
+
+Various optimizations with respect to large clusters, e.g. reducing the number of cluster wide calls made, decreasing
+the size of various merge-related messages, better handling of concurrent merges etc.
+
Bug fixes
@@ -103,6 +132,13 @@ Error starting shared transport causes future channels using it to fail
[https://issues.jboss.org/browse/JGRP-1356]
+RspFilter: incorrect implementation can block an RPC
+----------------------------------------------------
+[https://issues.jboss.org/browse/JGRP-1330]
+
+When an incorrect RspFilter doesn't terminate the RPC even though all responses have been received, the RPC is
+nevertheless terminated.
+
Manual
@@ -121,5 +157,5 @@ Vladimir Blagojevic, Toronto, Canada
Richard Achmatowicz, Toronto, Canada
Sanne Grinovero, Newcastle, Great Britain
-Oct 2011
+Nov 2011
View
2 doc/manual/en/modules/blocks.xml
@@ -881,7 +881,7 @@ for (int i = 0; i < runnerCount; ++i) {
Add protocol COUNTER to the top of the stack configuration
</listitem>
<listitem>
- Create an instanceof CounterService
+ Create an instance of CounterService
</listitem>
<listitem>
Create a new or get an existing named counter
View
2 src/org/jgroups/MembershipListener.java
@@ -39,7 +39,7 @@
* messages. Any messages sent after returning from this callback might get blocked by the FLUSH
* protocol. When the FLUSH protocol is done, and messages can be sent again, the FLUSH protocol
* will simply unblock all pending messages. If a callback for unblocking is desired, implement
- * {@link org.jgroups.ExtendedMembershipListener#unblock()}. Note that block() is the equivalent
+ * {@link org.jgroups.MembershipListener#unblock()}. Note that block() is the equivalent
* of reception of a BlockEvent in the pull mode.
*/
void block();
View
5 src/org/jgroups/blocks/GroupRequest.java
@@ -125,12 +125,11 @@ public void receiveResponse(Object response_value, Address sender, boolean is_ex
rsp.setException((Throwable)response_value);
else
rsp.setValue((T)response_value);
+ rsp.setReceived(true);
+ num_valid++;
}
- rsp.setReceived(responseReceived);
}
- if(responseReceived)
- num_valid++;
done=responsesComplete() || (rsp_filter != null && !rsp_filter.needMoreResponses());
if(responseReceived || done)
completed.signalAll(); // wakes up execute()
View
2 src/org/jgroups/blocks/MessageDispatcher.java
@@ -369,7 +369,7 @@ public void done(long req_id) {
else throw new RuntimeException(exception);
}
- if(!rsp.wasReceived())
+ if(!rsp.wasReceived() && !req.responseReceived())
throw new TimeoutException("timeout sending message to " + dest);
return rsp.getValue();
}
View
29 src/org/jgroups/blocks/UnicastRequest.java
@@ -66,21 +66,22 @@ public void receiveResponse(Object response_value, Address sender, boolean is_ex
return;
if(!result.wasReceived()) {
num_received++;
- boolean responseReceived=(rsp_filter == null) || rsp_filter.isAcceptable(response_value, sender);
- if(is_exception && response_value instanceof Throwable)
- result.setException((Throwable)response_value);
- else
- result.setValue((T)response_value);
- result.setReceived(responseReceived);
- if(log.isTraceEnabled()) {
- StringBuilder sb=new StringBuilder("received response for request ");
- sb.append(req_id).append(", sender=").append(sender);
+ if(rsp_filter == null || rsp_filter.isAcceptable(response_value, sender)) {
if(is_exception && response_value instanceof Throwable)
- sb.append(", exception=");
+ result.setException((Throwable)response_value);
else
- sb.append(", val=");
- sb.append(response_value);
- log.trace(sb.toString());
+ result.setValue((T)response_value);
+ result.setReceived(true);
+ if(log.isTraceEnabled()) {
+ StringBuilder sb=new StringBuilder("received response for request ");
+ sb.append(req_id).append(", sender=").append(sender);
+ if(is_exception && response_value instanceof Throwable)
+ sb.append(", exception=");
+ else
+ sb.append(", val=");
+ sb.append(response_value);
+ log.trace(sb.toString());
+ }
}
}
done=responsesComplete() || (rsp_filter != null && !rsp_filter.needMoreResponses());
@@ -94,6 +95,8 @@ public void receiveResponse(Object response_value, Address sender, boolean is_ex
checkCompletion(this);
}
+ public boolean responseReceived() {return num_received >= 1;}
+
/**
* <b>Callback</b> (called by RequestCorrelator or Transport).
View
108 tests/junit/org/jgroups/blocks/MuxRpcDispatcherTest.java
@@ -1,9 +1,6 @@
package org.jgroups.blocks;
-import org.jgroups.Address;
-import org.jgroups.Channel;
-import org.jgroups.Global;
-import org.jgroups.JChannel;
+import org.jgroups.*;
import org.jgroups.blocks.mux.MuxRpcDispatcher;
import org.jgroups.blocks.mux.MuxUpHandler;
import org.jgroups.tests.ChannelTestBase;
@@ -26,7 +23,7 @@
private RpcDispatcher[] dispatchers = new RpcDispatcher[2];
private RpcDispatcher[][] muxDispatchers = new RpcDispatcher[2][2];
-
+
@BeforeClass
void setUp() throws Exception {
@@ -65,47 +62,37 @@ void tearDown() throws Exception {
}
public void testMulticastRPCs() throws Exception {
-
MethodCall method = new MethodCall("getName", new Object[0], new Class[0]);
+ RequestOptions options=RequestOptions.SYNC().setTimeout(30000);
// Validate normal dispatchers
- Map<Address, Rsp<String>> responses = dispatchers[0].callRemoteMethods(null, method, RequestOptions.SYNC());
-
+ Map<Address, Rsp<String>> responses = dispatchers[0].callRemoteMethods(null, method, options);
Assert.assertEquals(responses.size(), 2);
- for (int i = 0; i < dispatchers.length; ++i) {
-
+ for (int i = 0; i < dispatchers.length; ++i)
verifyResponse(responses, channels[i], "dispatcher[" + i + "]");
- }
// Validate muxed dispatchers
for (int j = 0; j < muxDispatchers[0].length; ++j) {
-
- responses = muxDispatchers[0][j].callRemoteMethods(null, method, RequestOptions.SYNC());
-
+ responses = muxDispatchers[0][j].callRemoteMethods(null, method, options);
Assert.assertEquals(responses.size(), 2);
-
- for (int i = 0; i < dispatchers.length; ++i) {
-
+ for (int i = 0; i < dispatchers.length; ++i)
verifyResponse(responses, channels[i], "muxDispatcher[" + i + "][" + j + "]");
- }
}
// Validate muxed rpc dispatchers w/filter
final Address address = channels[0].getAddress();
RspFilter filter = new RspFilter() {
-
public boolean isAcceptable(Object response, Address sender) {
return !sender.equals(address);
}
-
public boolean needMoreResponses() {
return true;
}
};
- responses = muxDispatchers[0][0].callRemoteMethods(null, method, RequestOptions.SYNC().setRspFilter(filter));
+ responses = muxDispatchers[0][0].callRemoteMethods(null,method,RequestOptions.SYNC().setTimeout(30000).setRspFilter(filter));
Assert.assertEquals(responses.size(), 2);
verifyResponse(responses, channels[0], null);
@@ -114,14 +101,13 @@ public boolean needMoreResponses() {
// Validate stopped mux dispatcher response is auto-filtered
muxDispatchers[1][0].stop();
- responses = muxDispatchers[0][0].callRemoteMethods(null, method, RequestOptions.SYNC().setRspFilter(null));
-
+ responses = muxDispatchers[0][0].callRemoteMethods(null, method, options.setTimeout(2000));
Assert.assertEquals(responses.size(), 2);
verifyResponse(responses, channels[0], "muxDispatcher[0][0]");
verifyResponse(responses, channels[1], null);
// Validate stopped mux dispatcher response is auto-filtered and custom filter is applied
- responses = muxDispatchers[0][0].callRemoteMethods(null, method, RequestOptions.SYNC().setRspFilter(filter));
+ responses = muxDispatchers[0][0].callRemoteMethods(null,method,RequestOptions.SYNC().setTimeout(2000).setRspFilter(filter));
Assert.assertEquals(responses.size(), 2);
verifyResponse(responses, channels[0], null);
@@ -130,66 +116,62 @@ public boolean needMoreResponses() {
// Validate restarted mux dispatcher functions normally
muxDispatchers[1][0].start();
- responses = muxDispatchers[0][0].callRemoteMethods(null, method, RequestOptions.SYNC().setRspFilter(null));
+ responses = muxDispatchers[0][0].callRemoteMethods(null, method, options.setTimeout(30000));
Assert.assertEquals(responses.size(), 2);
verifyResponse(responses, channels[0], "muxDispatcher[0][0]");
verifyResponse(responses, channels[1], "muxDispatcher[1][0]");
}
- public void testUnicastRPCs() throws Exception {
+
+ public void testUnicastRPCs() throws Exception {
+ RequestOptions options=RequestOptions.SYNC().setTimeout(30000);
MethodCall method = new MethodCall("getName", new Object[0], new Class[0]);
final Address address = channels[1].getAddress();
// Validate normal dispatchers
- Object response = dispatchers[0].callRemoteMethod(address, method, RequestOptions.SYNC());
-
+ Object response = dispatchers[0].callRemoteMethod(address, method, options);
Assert.assertEquals(response, "dispatcher[1]");
// Validate muxed dispatchers
for (int j = 0; j < muxDispatchers[0].length; ++j) {
-
- response = muxDispatchers[0][j].callRemoteMethod(address, method, RequestOptions.SYNC());
-
+ response = muxDispatchers[0][j].callRemoteMethod(address, method, options);
Assert.assertEquals(response, "muxDispatcher[1][" + j + "]");
}
// Filter testing is disabled for now pending filter improvements in JGroups 3
-// // Validate muxed rpc dispatchers w/filter
-//
-// RspFilter filter = new RspFilter() {
-//
-// @Override
-// public boolean isAcceptable(Object response, Address sender) {
-// return !sender.equals(address);
-// }
-//
-// @Override
-// public boolean needMoreResponses() {
-// return true;
-// }
-// };
-//
-// response = muxDispatchers[0][0].callRemoteMethod(address, method, RequestOptions.SYNC.setRspFilter(filter));
-//
-// Assert.assertNull(address);
-//
-// // Validate stopped mux dispatcher response is auto-filtered
-// muxDispatchers[1][0].stop();
-//
-// response = muxDispatchers[0][0].callRemoteMethod(address, method, RequestOptions.SYNC.setRspFilter(null));
-//
-// Assert.assertNull(address);
-//
-// // Validate restarted mux dispatcher functions normally
-// muxDispatchers[1][0].start();
-//
-// response = muxDispatchers[0][0].callRemoteMethod(address, method, RequestOptions.SYNC.setRspFilter(null));
-//
-// Assert.assertEquals(response, "muxDispatcher[1][0]");
+ // Validate muxed rpc dispatchers w/filter
+
+ RspFilter filter = new RspFilter() {
+ @Override public boolean isAcceptable(Object response, Address sender) {return !sender.equals(address);}
+ @Override public boolean needMoreResponses() {return true;}
+ };
+
+ response = muxDispatchers[0][0].callRemoteMethod(address, method, RequestOptions.SYNC().setRspFilter(filter));
+ assert response == null;
+
+ // Validate stopped mux dispatcher response is auto-filtered
+ muxDispatchers[1][0].stop();
+
+ try {
+ response = muxDispatchers[0][0].callRemoteMethod(address, method, RequestOptions.SYNC().setTimeout(2000).setRspFilter(null));
+ assert false : "should have run into a TimeoutException";
+ }
+ catch(TimeoutException timeout) {
+ System.out.println("received " + timeout + " - as expected");
+ }
+
+ Assert.assertNull(response);
+
+ // Validate restarted mux dispatcher functions normally
+ muxDispatchers[1][0].start();
+
+ response = muxDispatchers[0][0].callRemoteMethod(address, method, RequestOptions.SYNC().setRspFilter(null));
+
+ Assert.assertEquals(response, "muxDispatcher[1][0]");
}
private static void verifyResponse(Map<Address,Rsp<String>> responses, Channel channel, Object expected) {
View
4 tests/junit/org/jgroups/protocols/UNICAST_ContentionTest.java
@@ -97,10 +97,10 @@ public void testMessageReceptionUnderHighLoad(String props) throws Exception {
long NUM_EXPECTED_MSGS=NUM_THREADS * NUM_MSGS;
- for(int i=0; i < 100; i++) {
+ for(int i=0; i < 20; i++) {
if(r1.getNum() == NUM_EXPECTED_MSGS && r2.getNum() == NUM_EXPECTED_MSGS)
break;
- Util.sleep(500);
+ Util.sleep(2000);
UNICAST2 unicast2=(UNICAST2)c1.getProtocolStack().findProtocol(UNICAST2.class);
if(unicast2 != null)
unicast2.sendStableMessages();

0 comments on commit b12d420

Please sign in to comment.
Something went wrong with that request. Please try again.