Late joiner history discrepancy between C++ vs. Java, is there a race condition?

4 posts / 0 new
Last post
Offline
Last seen: 47 min 3 sec ago
Joined: 09/09/2018
Posts: 2
Late joiner history discrepancy between C++ vs. Java, is there a race condition?

Setup

  • 80 participants
  • 13 Topics on domain
  • Topic A contains 14,000 unique key values
    • Topic A’s history is KEEP_LAST with depth 1
    • Topic A’s durability is TRANSIENT_LOCAL
    • Topic A’s reliability is RELIABLE
    • Topic A’s all sample elements are set to UNLIMITED
  • Network is 100 Mb/s
  • Late joining Java code doesn’t receive all the history for topic A
  • Created a standalone c++ app that is using the exact same Qos and it consistently receive more history than the Java
  • Both the c++ and Java discovery the same number of participant and subscription matches
  • When I look at a key that is missing from a participant, the participant has 12 key values it is producing but the Java is missing 1 of the 12
  • During the running of the Java over 6 minutes, I print out lost and rejected stats every 30 seconds, and at the end of 6 minutes they are both zero
    • SampleLostStatus::total_count_change = 0
    • SampleLostStatus::total_count = 0
    • SampleLostStatus::last_reason = NOT_LOST
    • SampleRejectedStatus::total_count_change = 0
    • SampleRejectedStatus::total_count = 0
    • SampleRejectedStatus::last_reason = NOT_REJECTED
  • I don’t see drops in /proc/net/udp for any of the sockets

How is it possible that I discover a participant, get a subscription match and receive only 11 out of the 12 keys it is publishing?

 

Howard's picture
Offline
Last seen: 33 min 50 sec ago
Joined: 11/29/2012
Posts: 675

Don't quite understand fully your scenario.

Is Topic A the only one with TRANSIENT_LOCAL?   How many participants publish TOPIC A?

You wrote that a participant has 12 key values, I guess you mean the DataWriter in that participant published 12 key values.   Do all participants (80) publish 12 unique key values (different from each other)?  (I assume that a "key value" is a unique value for the key, so 12 key values == 12 instances)

You wrote that Topic A has 14,000 instances (aka key values).  But 80 participants * 12 key values per participant = 960 key values (instances).

How many total instances are there?

What is your Java code for receiving Data from the DataReader?

Does "more history" mean all values that you expect to receive, i.e., one value for each instance that was published for Topic A by a participant?   or is the C++ app also missing data, but just getting "more" than the Java app?

 

Offline
Last seen: 47 min 3 sec ago
Joined: 09/09/2018
Posts: 2

Is Topic A the only one with TRANSIENT_LOCAL?

No, I counted wrong there are 16 Topics of which 7 are TRANSIENT_LOCAL, the others are VOLATILE

 How many participants publish TOPIC A?

 80 participants

What is your Java code for receiving Data from the DataReader?

I can't post it but it is using a waitset.

Does "more history" mean ...

Still trying to confirm what the total nuimber I should expect to receive and C++ app seems to always get more that Java and C++ get the same number everytime it is run.

Howard's picture
Offline
Last seen: 33 min 50 sec ago
Joined: 11/29/2012
Posts: 675

What is the code that calls the DataReader object to get the data?

And how do you loop through the returned data?

Is it exactly the same in C++ and Java...or are you using different APIs?