Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 0 additions & 85 deletions common/src/main/java/org/tron/common/config/DbBackupConfig.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import lombok.Setter;
import org.slf4j.bridge.SLF4JBridgeHandler;
import org.tron.common.args.GenesisBlock;
import org.tron.common.config.DbBackupConfig;
import org.tron.common.cron.CronExpression;
import org.tron.common.logsfilter.EventPluginConfig;
import org.tron.common.logsfilter.FilterQuery;
Expand Down Expand Up @@ -425,8 +424,6 @@ public class CommonParameter {
@Setter
public double rateLimiterDisconnect; // clearParam: 1.0
@Getter
public DbBackupConfig dbBackupConfig;
@Getter
public RocksDbSettings rocksDBCustomSettings;
@Getter
public GenesisBlock genesisBlock;
Expand Down
11 changes: 0 additions & 11 deletions common/src/main/java/org/tron/core/config/args/StorageConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public class StorageConfig {
private TransHistoryConfig transHistory = new TransHistoryConfig();
private boolean needToUpdateAsset = true;
private DbSettingsConfig dbSettings = new DbSettingsConfig();
private BackupConfig backup = new BackupConfig();
private BalanceConfig balance = new BalanceConfig();
private CheckpointConfig checkpoint = new CheckpointConfig();
private SnapshotConfig snapshot = new SnapshotConfig();
Expand Down Expand Up @@ -129,16 +128,6 @@ void postProcess() {
}
}

@Getter
@Setter
public static class BackupConfig {
private boolean enable = false;
private String propPath = "prop.properties";
private String bak1path = "bak1/database/";
private String bak2path = "bak2/database/";
private int frequency = 10000;
}

@Getter
@Setter
public static class BalanceConfig {
Expand Down
9 changes: 0 additions & 9 deletions common/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,6 @@ storage {
# Number of blocks flushed to db in each batch during node syncing.
snapshot.maxFlushCount = 1

# Database backup settings (RocksDB only)
backup = {
enable = false
propPath = "prop.properties"
bak1path = "bak1/database/"
bak2path = "bak2/database/"
frequency = 10000
}

# Data root setting, for check data, currently only reward-vi is used.
# merkleRoot = {
# reward-vi = 9debcb9924055500aaae98cdee10501c5c39d4daa75800a996f4bdda73dbccd8 // main-net
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public void testDefaults() {
assertEquals("database", sc.getDb().getDirectory());
assertEquals("index", sc.getIndex().getDirectory());
assertTrue(sc.isNeedToUpdateAsset());
assertFalse(sc.getBackup().isEnable());
assertEquals(10000, sc.getBackup().getFrequency());
assertEquals(7, sc.getDbSettings().getLevelNumber());
assertEquals(5000, sc.getDbSettings().getMaxOpenFiles());
}
Expand All @@ -44,8 +42,6 @@ public void testFromConfig() {
assertEquals("ROCKSDB", sc.getDb().getEngine());
assertTrue(sc.getDb().isSync());
assertEquals("mydb", sc.getDb().getDirectory());
assertTrue(sc.getBackup().isEnable());
assertEquals(5000, sc.getBackup().getFrequency());
assertEquals(5, sc.getDbSettings().getLevelNumber());
assertEquals(3000, sc.getDbSettings().getMaxOpenFiles());
}
Expand Down
1 change: 0 additions & 1 deletion framework/Daily_Build_Report

This file was deleted.

2 changes: 0 additions & 2 deletions framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ def configureTestTask = { Task t ->
}
if (isWindows()) {
t.exclude '**/ShieldedTransferActuatorTest.class'
t.exclude '**/BackupDbUtilTest.class'
t.exclude '**/ManagerTest.class'
t.exclude 'org/tron/core/zksnark/**'
t.exclude 'org/tron/common/runtime/vm/PrecompiledContractsVerifyProofTest.class'
Expand Down Expand Up @@ -161,7 +160,6 @@ tasks.register('testWithRocksDb', Test) {
include 'org/tron/core/config/args/ArgsTest.class'
include 'org/tron/core/db/DBIteratorTest.class'
include 'org/tron/core/db/TronDatabaseTest.class'
include 'org/tron/core/db/backup/BackupDbUtilTest.class'
include 'org/tron/core/db2/ChainbaseTest.class'
exclude '**/LevelDbDataSourceImplTest.class'
}
Expand Down
Empty file removed framework/prop.properties
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.tron.common.utils.StorageUtils;
import org.tron.core.config.args.Args;
import org.tron.core.db.RevokingDatabase;
import org.tron.core.db.backup.BackupRocksDBAspect;
import org.tron.core.db.backup.NeedBeanCondition;
import org.tron.core.db2.core.SnapshotManager;
import org.tron.core.services.interfaceOnPBFT.RpcApiServiceOnPBFT;
import org.tron.core.services.interfaceOnPBFT.http.PBFT.HttpApiOnPBFTService;
Expand Down Expand Up @@ -88,9 +85,4 @@ public HttpApiOnPBFTService getHttpApiOnPBFTService() {
return null;
}

@Bean
@Conditional(NeedBeanCondition.class)
public BackupRocksDBAspect backupRocksDBAspect() {
return new BackupRocksDBAspect();
}
}
7 changes: 0 additions & 7 deletions framework/src/main/java/org/tron/core/config/args/Args.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.tron.common.args.Account;
import org.tron.common.args.GenesisBlock;
import org.tron.common.args.Witness;
import org.tron.common.config.DbBackupConfig;
import org.tron.common.cron.CronExpression;
import org.tron.common.logsfilter.EventPluginConfig;
import org.tron.common.logsfilter.FilterQuery;
Expand Down Expand Up @@ -225,12 +224,6 @@ private static void applyStorageConfig(StorageConfig sc) {
PARAMETER.storage.setTxCacheInitOptimization(sc.getTxCache().isInitOptimization());
PARAMETER.storage.setMaxFlushCount(sc.getSnapshot().getMaxFlushCount());

// backup
StorageConfig.BackupConfig backup = sc.getBackup();
PARAMETER.dbBackupConfig = DbBackupConfig.getInstance()
.initArgs(backup.isEnable(), backup.getPropPath(),
backup.getBak1path(), backup.getBak2path(), backup.getFrequency());

// RocksDB settings
StorageConfig.DbSettingsConfig dbs = sc.getDbSettings();
PARAMETER.rocksDBCustomSettings = RocksDbSettings
Expand Down
Loading
Loading