Skip to content

Commit

Permalink
[AMQ-8354] Fix the bug with resync on format exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaShupletsov committed Jan 14, 2025
1 parent 8014360 commit 6707762
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,6 @@ void initialize() throws Exception {
}

void deinitialize() throws Exception {
if (!initialized.get()) {
return;
}

logger.info("de-initializing replica sequencer");

if (ackTaskRunner != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ public void start(ReplicaRole role, boolean resync) throws Exception {
replicaSequencer.initialize();
} catch (ReplicaStorageFormatException e) {
logger.warn("ReplicaSequenceStorage is in old format. Initiating the resyncronization.");
replicaSequencer.deinitialize();
removeReplicationQueues();
initQueueProvider();
replicaResynchronizer.resynchronize(role, true);
replicaSequencer.initialize();
}
Expand Down

0 comments on commit 6707762

Please sign in to comment.