Ticket #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: | |
| Cc: |
Description
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.

Evaluation
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.