aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-02-24 10:42:15 -0500
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-02-24 16:10:26 -0500
commit20e1b6517b1c64a82cb52be8a2a2882c86b1318b (patch)
tree68acb7b130d6c479eaaa6ba91275b5b2b2897bb6 /mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
parent57af0e334073b329ca9f48b353ab4cc3bd2027a8 (diff)
Prevent race conditions on same distributionId.
- Code to include optimistic lock to prevent race conditions on same distributionId. Change-Id: Ibe110b32f2472d991a4a3e03e3d15d5e4deefd65 Issue-ID: SO-1566 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql')
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql9
1 files changed, 5 insertions, 4 deletions
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
index bf9a9e1dfe..541f356055 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
+++ b/mso-api-handlers/mso-requests-db-repositories/src/test/resources/schema.sql
@@ -177,15 +177,16 @@ INSERT INTO PUBLIC.SITE_STATUS(SITE_NAME, STATUS, CREATION_TIMESTAMP) VALUES
CREATE CACHED TABLE PUBLIC.WATCHDOG_DISTRIBUTIONID_STATUS(
DISTRIBUTION_ID VARCHAR NOT NULL,
DISTRIBUTION_ID_STATUS VARCHAR,
+ LOCK_VERSION int,
CREATE_TIME VARCHAR,
MODIFY_TIME VARCHAR
);
-INSERT INTO PUBLIC.WATCHDOG_DISTRIBUTIONID_STATUS(DISTRIBUTION_ID, DISTRIBUTION_ID_STATUS, CREATE_TIME, MODIFY_TIME) VALUES
-('1533c4bd-a3e3-493f-a16d-28c20614415e', '', '2017-11-30 15:48:09', '2017-11-30 15:48:09'),
-('55429711-809b-4a3b-9ee5-5120d46d9de0', '', '2017-11-30 16:35:36', '2017-11-30 16:35:36'),
-('67f0b2d1-9013-4b2b-9914-bbe2288284fb', '', '2017-11-30 15:54:39', '2017-11-30 15:54:39');
+INSERT INTO PUBLIC.WATCHDOG_DISTRIBUTIONID_STATUS(DISTRIBUTION_ID, DISTRIBUTION_ID_STATUS, LOCK_VERSION, CREATE_TIME, MODIFY_TIME) VALUES
+('1533c4bd-a3e3-493f-a16d-28c20614415e', '', 0, '2017-11-30 15:48:09', '2017-11-30 15:48:09'),
+('55429711-809b-4a3b-9ee5-5120d46d9de0', '', 0, '2017-11-30 16:35:36', '2017-11-30 16:35:36'),
+('67f0b2d1-9013-4b2b-9914-bbe2288284fb', '', 0, '2017-11-30 15:54:39', '2017-11-30 15:54:39');
CREATE CACHED TABLE PUBLIC.WATCHDOG_PER_COMPONENT_DISTRIBUTION_STATUS(
DISTRIBUTION_ID VARCHAR NOT NULL,