[
https://issues.jboss.org/browse/JGRP-2024?page=com.atlassian.jira.plugin....
]
Bela Ban commented on JGRP-2024:
--------------------------------
You're reusing the buffer into which you read the text. Since a message can be queued
at the transport level, re-reading data into the same buffer might change it while the
message is still being sent.
I changed this to create a new buffer every time you read data, but I'm adding code to
verify the correct order automatically, comparing the text line-by-line kills my eyes...
:-)
Receiving messages out of order.
--------------------------------
Key: JGRP-2024
URL:
https://issues.jboss.org/browse/JGRP-2024
Project: JGroups
Issue Type: Bug
Affects Versions: 3.6.7, 3.6.8
Environment: RedHat 6.7
Java 1.8.0 Update 45
Reporter: Dylan Turnbull
Assignee: Bela Ban
Fix For: 4.0
Attachments: jGroups Unit Test.zip
After splitting a file into smaller messages and send them down the channel the messages
are received on the other side out of order.
Below is a sample output:
*+On the sender:+*
Sending...
Data Sent:
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum
has been the industry's standard dummy te
-----------------------------------------------------
Data Sent:
xt ever since the 1500s, when an unknown printer took a galley of type and scrambled it
to make a type specimen book. It has sur
-----------------------------------------------------
Data Sent:
vived not only five centuries, but also the leap into electronic typesetting, re
-----------------------------------------------------
Data Sent:
d in the 1960s with the release of Letraset sheets containing Lorem Ipsum passag
*+On the receiver:+*
Listening...
Data Received:
xt ever since the 1500s, when an unknown printer took a galley of type and scrambled it
to make a type specimen book. It has sur
-----------------------------------------------------
Data Received:
vived not only five centuries, but also the leap into electronic typesetting, remaining
essentially unchanged. It was popularise
-----------------------------------------------------
Data Received:
d in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and
more recently with desktop publishing so
-----------------------------------------------------
Data Received:
ftware like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum passages, and
more recently with desktop publishing so
-----------------------------------------------------
Data Received:
ftware like Aldus PageMaker including versions of Lorem Ipsum.Lorem Ipsum passages, and
more recently with desktop publishing so
-----------------------------------------------------
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)