Skip to content

feat: do not fetch vfs backup if it exists#12

Open
ivan-tymoshenko wants to merge 1 commit intomainfrom
do-not-overwrite-vfs
Open

feat: do not fetch vfs backup if it exists#12
ivan-tymoshenko wants to merge 1 commit intomainfrom
do-not-overwrite-vfs

Conversation

@ivan-tymoshenko
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

@marcopiraccini marcopiraccini left a comment

Choose a reason for hiding this comment

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

OK

config: Record<string, any>
): Promise<boolean> {
const filePath = resolve(config.vfsDir, `${instanceId}.sqlite`)
if (existsSync(filePath)) return true
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do not use Sync methods for file existance checking. Also. this check is incomplete as we should validate that this is actually the same file that is available on Redis as split-brain situation might cause desync

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.

3 participants