You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 07:28:59 UTC
svn commit: r1131781 -
/incubator/mesos/trunk/src/third_party/libprocess/reliable.cpp
Author: benh
Date: Sun Jun 5 05:28:58 2011
New Revision: 1131781
URL: http://svn.apache.org/viewvc?rev=1131781&view=rev
Log:
Minor bug fix in ReliableProcess (I think).
Modified:
incubator/mesos/trunk/src/third_party/libprocess/reliable.cpp
Modified: incubator/mesos/trunk/src/third_party/libprocess/reliable.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/third_party/libprocess/reliable.cpp?rev=1131781&r1=1131780&r2=1131781&view=diff
==============================================================================
--- incubator/mesos/trunk/src/third_party/libprocess/reliable.cpp (original)
+++ incubator/mesos/trunk/src/third_party/libprocess/reliable.cpp Sun Jun 5 05:28:58 2011
@@ -91,14 +91,15 @@ int ReliableProcess::seq() const
bool ReliableProcess::duplicate() const
{
// TODO(benh): Since we ignore out-of-order messages right now, a
- // duplicate message is just one that we've already seen
- // before. Note that we don't add the sequence identifier for the
- // current message until the next 'receive' invocation (see below)..
+ // duplicate message is just one whose sequence identifier is
+ // greater than the last one we saw. Note that we don't add the
+ // sequence identifier for the current message until the next
+ // 'receive' invocation (see below).
if (current != NULL) {
map<PID, int>::const_iterator it = recvSeqs.find(current->msg.from);
if (it != recvSeqs.end()) {
int last = it->second;
- if (last <= current->seq)
+ if (current->seq <= last)
return true;
}
}