Skip to content

Commit

Permalink
Remove duplicate db persistence warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandraRoatis committed Mar 12, 2020
1 parent 65a3441 commit 1fdbf91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
8 changes: 0 additions & 8 deletions modAionImpl/src/org/aion/zero/impl/db/DatabaseUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ public static ByteArrayKeyValueDatabase connectAndOpen(Properties info, Logger L
info.getProperty(Props.DB_NAME));
}

// check persistence status
if (!db.isCreatedOnDisk() && db.getPersistenceMethod() != PersistenceMethod.DBMS) {
LOG.error(
"Database <{}> cannot be saved to disk for <{}>.",
info.getProperty(Props.DB_TYPE),
info.getProperty(Props.DB_NAME));
}

return db;
}

Expand Down
5 changes: 2 additions & 3 deletions modDbImpl/src/org/aion/db/impl/DatabaseFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,14 @@ private static AbstractDB connectBasic(Properties info, Logger log) {

if (dbType == DBVendor.MOCKDB) {
// MockDB does not require name and path checks
log.warn("WARNING: Active vendor is set to MockDB, data will not persist!");
log.warn("WARNING: Active vendor for <{}> is set to MockDB, data will not persist!", dbName);
return new MockDB(dbName, log);
}

String dbPath = info.getProperty(Props.DB_PATH);

if (dbType == DBVendor.PERSISTENTMOCKDB) {
log.warn(
"WARNING: Active vendor is set to PersistentMockDB, data will be saved only at close!");
log.warn("WARNING: Active vendor for <{}> is set to PersistentMockDB, data will be saved only at close!", dbName);
return new PersistentMockDB(dbName, dbPath, log);
}

Expand Down

0 comments on commit 1fdbf91

Please sign in to comment.