aservo / ldap-crowd-adapter

An LDAP server that delegates request to Atlassian Crowd
Apache License 2.0
2 stars 3 forks source link

Add high availability to sync job #27

Closed peterhoepfl closed 1 year ago

peterhoepfl commented 1 year ago

For high availability or multiple instance support the sync job has to be extended so that it always runs only on one instance. These new config parameters were introduced:

set initial delay for sync-job in seconds mirror.sync.initialdelay set period for sync-job in seconds mirror.sync.period enable postgres dblock for corwd-sync so that only one of instances executes the syncjob mirror.sync.usebdlock= mirror.sync.lockid= AcquireDbLock wait time, how long in seconds will the function in total try to get the lock persistence.acquiredblock-wait-time how many seconds shall AcquireDbLock wait between two tries persistence.acquiredblock-recheck-time

sonatype-lift[bot] commented 1 year ago

🛠 Lift Auto-fix

Some of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.[^1]

# Download the patch
curl https://lift.sonatype.com/api/patch/github.com/aservo/ldap-crowd-adapter/27.diff -o lift-autofixes.diff

# Apply the patch with git
git apply lift-autofixes.diff

# Review the changes
git diff

Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command:

curl https://lift.sonatype.com/api/patch/github.com/aservo/ldap-crowd-adapter/27.diff | git apply

Once you're satisfied, commit and push your changes in your project. [^1]: You can preview the patch by opening the patch URL in the browser.

brettaufheber commented 1 year ago

Please reformat the code: use simple spaces instead of tabs (\t)

peterhoepfl commented 1 year ago

I can't see any tabs in the code I committed, do you have an example?

sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

3.1% 3.1% Coverage
0.0% 0.0% Duplication