Introduced a startup delay mechanism based on the container hostname 59/140659/8
authorsourabh_sourabh <sourabh.sourabh@est.tech>
Tue, 8 Apr 2025 10:13:08 +0000 (11:13 +0100)
committersourabh_sourabh <sourabh.sourabh@est.tech>
Thu, 10 Apr 2025 16:22:40 +0000 (17:22 +0100)
commitb224464450433734a892240bc795787894fbaa13
tree07f4bf391f71912e7e1da305a424273aad6b633d
parent9b4acd5df37ac1915ce303894f33ea462b23a1a4
Introduced a startup delay mechanism based on the container hostname

- Extracted hostname using InetAddress and Calculated delay or fallback hash-based delay.
- This helps prevent the 'relation "databasechangelog" already exists' error seen in concurrent startups.

Issue-ID:CPS-2752
Change-Id: I051a8edd5ddab5a9fb012183b0526c113d90304e
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
cps-application/src/main/java/org/onap/cps/Application.java
cps-application/src/main/java/org/onap/cps/startup/InstanceStartupDelayManager.java [new file with mode: 0644]
cps-application/src/test/groovy/org/onap/cps/startup/InstanceStartupDelayManagerSpec.groovy [new file with mode: 0644]