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 authored and pkendall64 committed Oct 31, 2022
1 parent 5899101 commit 61e3af5
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 61e3af5

Please sign in to comment.