Story #7328
CN.setReplicationStatus increments serialVersion when there's no net change
100%
Description
Discovered when an MN repeatedly calling CN.setReplicationStatus with the same information caused the serialVersion to reach 127000.
When the status comes in, it is set without checking the existing value, and the serialVersion and dateSysMetadataModified properties are automatically updated. Better behavior would be to check the existing value and change it only if it's different, and only increment serialVersion and dateSysMetaModified if there was a change in value.
(In CNodeService)
History
#1 Updated by Jing Tao about 9 years ago
As Rob described, here is the plan:
In CNodeService.setReplication, the coming status will be checked. If there is no change, we wouldn't update the system metadata.
#2 Updated by Jing Tao about 9 years ago
- Status changed from New to Closed
- Target version set to CCI-2.0.0
- % Done changed from 0 to 100
Even though we do nothing if the coming status is the same one of the current status, the CNodeService.setReplicationsStatus still returns true.
Write a junit test and it worked.