Opened 15 years ago

Last modified 15 years ago

#215 new defect

NaN values in replicated state produce continuous updates

Reported by: hauma Owned by: hauma
Priority: normal Milestone: 2.0
Component: uka.karo Version: 1.08a
Severity: normal Keywords:


The update mechanism used in CollectiveReplication only marshals updates form one replica to another, only if the actual value in one replica has changed. This test uses the built-in (==) operator for all primitive types. Since Double.NaN != Double.NaN, this test detects always an update for replicated float and double values that are NaN.

A side effect of this behavior is that NaN values are likely to dominate changes to replicas of such double or float variables. After some has set a variable to NaN, it is hard to override this in a collective update, because each rank generates an update for its NaN value.

Attachments (0)

Change History (1)

comment:1 Changed 15 years ago by hauma

  • Milestone set to 2.00


Continuous updates for NaN values can be easily prevented by using a slightly more complex test for changes in float and double values using Double.isNaN(). But this would unnecessarily slow down the update for all floating point values. Since NaN is a strong evidence of a program error, its dominating behavior could even have advantages.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain hauma.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from hauma to the specified user. Next status will be 'new'.
The owner will be changed from hauma to anonymous. Next status will be 'assigned'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.