Story #1952
SerialVersion in SystemMetadata needs to be incremented with each Update
100%
Description
The serialVersion in SystemMetadata allows for consistency between updates of systemMetadata
systemMetadata can only be updated on the CN
systemMetadata is managed by Hazelcast
Every operation that manipulated SystemMetadata on the CN will follow the pattern:
lock(); get(); increment(); put(); unlock();
if (hzSystemMetadata.tryLock(pid, 500L, TimeUnit.MILLISECONDS)) {
Systemmetadata systemMetadata = hzSystemMetadata.get(pid);
do something here
systemMetadata.setSerialVersion (systemMetadata.getSerialVersion().add(BigInteger.ONE)); hzSystemMetadata.put(systemMetadata); hzSystemMetadata.unlock(pid);
}
and of course you'll want the above in a try catch block too, so that if an exception is raised, a lock will still be released
Locking will be performed on the hzSystemMetadata HazelcastMap
Get will be performed against the hzSystemMetadata HazelcastMap
increment is an operation performed on the SystemMetadata.serialVersion.
Put will be performed against the hzSystemMetadata HazelcastMap
Unlocking will be performed on the Hazelcast Lock structure
Subtasks
Related issues
History
#1 Updated by Dave Vieglais almost 13 years ago
- Target version changed from Sprint-2011.44-Block.6 to Sprint-2011.45-Block.6
- Position set to 1
#2 Updated by Dave Vieglais almost 13 years ago
- Target version changed from Sprint-2011.45-Block.6 to Sprint-2011.46-Block.6
- Position deleted (
9) - Position set to 1
#3 Updated by Robert Waltz almost 13 years ago
- Status changed from New to Closed