Skip to content

Commit

Permalink
DEV: Expand HazelcastPlugin startup time to widen window to expose ra…
Browse files Browse the repository at this point in the history
…ce conditions on startup.
  • Loading branch information
timw committed Aug 23, 2022
1 parent ce8d0de commit 800c193
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,17 @@ public void config(final OServer iServer, final OServerParameterConfiguration[]
public void startup() {
if (!enabled) return;

try {
final String delayEnv = System.getenv("HAZELCAST_PLUGIN_STARTUP_DELAY");
if (delayEnv != null) {
long delay = Long.parseLong(delayEnv);
OLogManager.instance().info(this, "Delaying HazelcastPlugin startup by '%d' ms", delay);
Thread.sleep(delay);
}
} catch (Throwable t) {
t.printStackTrace();
}

if (serverInstance.getDatabases() instanceof OrientDBDistributed)
((OrientDBDistributed) serverInstance.getDatabases()).setPlugin(this);

Expand Down

0 comments on commit 800c193

Please sign in to comment.