Skip to content

fix(backup-chain): next log backup can have the same LastLsn#103

Merged
Aditya Niraula (AdityaNPL) merged 5 commits intomasterfrom
fix/backup-chain/next-log-backup
May 9, 2022
Merged

fix(backup-chain): next log backup can have the same LastLsn#103
Aditya Niraula (AdityaNPL) merged 5 commits intomasterfrom
fix/backup-chain/next-log-backup

Conversation

@AdityaNPL
Copy link
Copy Markdown
Contributor

@AdityaNPL Aditya Niraula (AdityaNPL) commented May 3, 2022

(It looks like it made loads of white space changes automatically - pls ignore this while reviewing.)

I came across an instance where the LastLsn was the same for 2 backups. Hence, this check was filtering the log backup out.

image

Comment thread src/BackupChain.cs Outdated
Copy link
Copy Markdown
Contributor

@alexirion10 Alex Irion (alexirion10) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what scenario caused this, but ok. Take a look at the failing unit test plz

@AdityaNPL
Copy link
Copy Markdown
Contributor Author

Unit test:

System.OutOfMemoryException : Exception of type 'System.OutOfMemoryException' was thrown.

huh, that's weird - checking

@AdityaNPL
Copy link
Copy Markdown
Contributor Author

uggh, infinite loop while building the chain cause it's matching the same log backup over and over again

Comment thread src/BackupMetadata.cs Outdated
@AdityaNPL
Copy link
Copy Markdown
Contributor Author

Aditya Niraula (AdityaNPL) commented May 5, 2022

Fixed the infinite loop by making sure it isn't getting the same backup as the last one


Tested on a MSSQL DB with the lastLSNs equal for two of the backups
Also the unit tests should run fine now

@AdityaNPL Aditya Niraula (AdityaNPL) merged commit 83ec685 into master May 9, 2022
@alexirion10 Alex Irion (alexirion10) deleted the fix/backup-chain/next-log-backup branch April 11, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants