refactor(db): remove function for periodic backup of RocksDB database#6724
Open
317787106 wants to merge 4 commits intotronprotocol:developfrom
Open
refactor(db): remove function for periodic backup of RocksDB database#6724317787106 wants to merge 4 commits intotronprotocol:developfrom
317787106 wants to merge 4 commits intotronprotocol:developfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Removes the periodic database backup feature (
storage.backup) entirely. This includes the backup configuration class, the AspectJ aspect that interceptedpushBlockto trigger copies, the backup utility, and all associated test fixtures and config files.Closes #6595.
Why are these changes required?
The
storage.backupfeature was designed to guard against data corruption from disk failures or abrupt process termination (e.g.kill -9). It has since become more harmful than helpful:kill -9does not corrupt RocksDB, which was the primary motivation for the feature.node.backup(UDP keep-alive failover). If one node becomes unavailable, traffic can be switched to the standby without any file-copy disruption.Changes:
DbBackupConfig,BackupDbUtil,BackupRocksDBAspect,NeedBeanCondition(common/framework).CommonParameter.dbBackupConfigfield andArgs.initRocksDbBackupProperty()initialiser.ConfigKey.STORAGE_BACKUP_*constants and the conditionalbackupRocksDBAspectSpring bean fromDefaultConfig.BackupDbUtilTestandconfig-test-dbbackup.conf; updatedRocksDbDataSourceImplTestandSupplementTestto useTEST_CONF.storage.backupblock is no longer read and has no effect. Nodes carrying this section in their config file can leave it in place without error, but it will be silently ignored.Backward Compatibility: Not compatible with v4.8.1 or older.
This PR has been tested by:
Follow up
Operators who currently rely on
storage.backupshould migrate to thenode.backupprimary–backup failover configuration.Extra details
N/A