Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Bug 1234912 - Do not authenticate against new storage node when
Browse files Browse the repository at this point in the history
replication_factor of system_auth keyspace is wrong

Correctly close storage cluster session and fix scheduling interval of job

(cherry picked from commit 7fb9222)
Signed-off-by: Libor Zoubek <lzoubek@redhat.com>
  • Loading branch information
Libor Zoubek committed Oct 5, 2015
1 parent 7ce2963 commit 3ef0615
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Expand Up @@ -866,8 +866,7 @@ private void scheduleJobs() throws RuntimeException {

// Storage cluster replication factor check Job
try {
// TODO set appropriate timing
final long initialDelay = 1000L * 10 * 0; // 2 mins
final long initialDelay = 1000L * 60 * 2; // 2 mins
final long interval = 1000L * 60 * 5; // 5 mins
schedulerBean.scheduleSimpleRepeatingJob(ReplicationFactorCheckJob.class, true, false, initialDelay,
interval);
Expand Down
Expand Up @@ -24,7 +24,6 @@
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.TimeUnit;

import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.ProtocolOptions;
Expand Down Expand Up @@ -154,11 +153,9 @@ public void executeJobCode(JobExecutionContext context) throws JobExecutionExcep
log.error("Failed to connect to storage cluster", ex);
} finally {
if (session != null) {
boolean closed = session.shutdown(1, TimeUnit.MINUTES);
if (!closed) {
log.warn("Failed to shutdown storage cluster session within 1 minute");
}
session.shutdown();
}
cluster.shutdown();
}
}

Expand Down

0 comments on commit 3ef0615

Please sign in to comment.