Use DB time instead of jvm time 85/55585/2
authorJim Hahn <jrh3@att.com>
Fri, 29 Jun 2018 14:54:00 +0000 (10:54 -0400)
committerJim Hahn <jrh3@att.com>
Fri, 29 Jun 2018 16:25:04 +0000 (12:25 -0400)
commit1ed1beaaa4466fb55d7dba3e029b583b835b8aaf
tree0e5e1c3ff6cd5ca78ab76b491d21676c0b8ff111
parentee2313141a40222a83d6bf39a15c3f9d4c3a239e
Use DB time instead of jvm time

Modified distributed locking code to use the DB time (i.e., "now()") when
determining expiration times of locks.  This will eliminate concerns that
may arise from different timestamps on different JVMs.  As part of the
change, the expirationTime column was changed from BIGINT to TIMESTAMP.
Rename 1810 sql scripts to 1811, to match release date.

Change-Id: Ibfb15742f447133b001e4340027657ac202864a6
Issue-ID: POLICY-872
Signed-off-by: Jim Hahn <jrh3@att.com>
feature-distributed-locking/src/main/feature/db/pooling/sql/1811-distributedlocking.downgrade.sql [new file with mode: 0644]
feature-distributed-locking/src/main/feature/db/pooling/sql/1811-distributedlocking.upgrade.sql [new file with mode: 0644]
feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/DistributedLockingFeature.java
feature-distributed-locking/src/main/java/org/onap/policy/distributed/locking/TargetLock.java
feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/TargetLockTest.java