Skip to content

Commit

Permalink
ignore load stage if already loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
zydcom committed Feb 23, 2017
1 parent 979d58b commit 7188e33
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/jmongosysbenchload.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ else if ((myWriteConcern.toLowerCase().equals("safe"))) {

DB db = m.getDB(dbName);

// skip load if already loaded
DBObject cmd = new BasicDBObject();
cmd.put("collStats", "sbtest1");
CommandResult collStats = db.command(cmd);
if (collStats.ok()) {
logMe("*** ignore load stage because already loaded");
System.exit(1);
}

// determine server type : mongo or tokumx
DBObject checkServerCmd = new BasicDBObject();
CommandResult commandResult = db.command("buildInfo");
Expand Down

0 comments on commit 7188e33

Please sign in to comment.