From 1fdbf91a9289755adeeb2998d791023086dcf345 Mon Sep 17 00:00:00 2001 From: Alexandra Roatis Date: Thu, 12 Mar 2020 15:52:10 -0400 Subject: [PATCH] Remove duplicate db persistence warnings --- modAionImpl/src/org/aion/zero/impl/db/DatabaseUtils.java | 8 -------- modDbImpl/src/org/aion/db/impl/DatabaseFactory.java | 5 ++--- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/modAionImpl/src/org/aion/zero/impl/db/DatabaseUtils.java b/modAionImpl/src/org/aion/zero/impl/db/DatabaseUtils.java index 4332535007..6468a63e70 100644 --- a/modAionImpl/src/org/aion/zero/impl/db/DatabaseUtils.java +++ b/modAionImpl/src/org/aion/zero/impl/db/DatabaseUtils.java @@ -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; } diff --git a/modDbImpl/src/org/aion/db/impl/DatabaseFactory.java b/modDbImpl/src/org/aion/db/impl/DatabaseFactory.java index f58adea3c4..146d4001b1 100644 --- a/modDbImpl/src/org/aion/db/impl/DatabaseFactory.java +++ b/modDbImpl/src/org/aion/db/impl/DatabaseFactory.java @@ -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); }