Skip to content

Commit

Permalink
Fix fast-reboot DB migration (#2734)
Browse files Browse the repository at this point in the history
Fix DB migrator logic for migrating fast-reboot table, fixing #2621 db_migrator.

How I did it
Checking if fast-reboot table exists in DB.

How to verify it
Verified manually, migrating after fast-reboot and after cold/warm reboot.
  • Loading branch information
arfeigin authored and StormLiangMS committed Mar 19, 2023
1 parent 0193618 commit b03d0b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/db_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,8 +857,8 @@ def version_4_0_0(self):
# reading FAST_REBOOT table can't be done with stateDB.get as it uses hget behind the scenes and the table structure is
# not using hash and won't work.
# FAST_REBOOT table exists only if fast-reboot was triggered.
keys = self.stateDB.keys(self.stateDB.STATE_DB, "FAST_REBOOT")
if keys is not None:
keys = self.stateDB.keys(self.stateDB.STATE_DB, "FAST_REBOOT|system")
if keys:
enable_state = 'true'
else:
enable_state = 'false'
Expand Down

0 comments on commit b03d0b9

Please sign in to comment.