Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fast-reboot check for warm-restart common-helper #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arfeigin
Copy link
Owner

@arfeigin arfeigin commented Jun 6, 2023

Add function to check if fast-reboot is in progress, similar to warm-reboot.

This is needed to differ fast-reboot from warm-reboot as fast-reboot is using warm-reboot infrastructure.

auto& warmStart = getInstance();

// Check system level warm-restart config first
warmStart.m_stateFastRestartEnableTable->hget("system", "enable", value);
Copy link

Choose a reason for hiding this comment

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

@arfeigin what is the behaviour when record is not present in DB? Will it throw an exception?

Copy link
Owner Author

Choose a reason for hiding this comment

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

According to table.cpp implementation it will return false in not present. It might throw an exception if entry exists but value is not a string. I used the same logic used for checkWarmStart.

if (reply->type == REDIS_REPLY_NIL)

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