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

FOGL-6891: Handle storage service restart #59

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft

Conversation

AmandeepArora
Copy link
Contributor

Storage service restart is handled in notification service. But this hasn't been tested a lot. Also lots of debug logs are still present in this current code.

Copy link
Contributor

@MarkRiddoch MarkRiddoch left a comment

Choose a reason for hiding this comment

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

The unit tests are failing and need to be addressed.

I see a number of #if 1 and #if 0 blocks that make this look like experimental code. We should either indicate why the alternatives are there or remove them if it was experimental code.

The code is littered with PRINT_FUNC, is this a debugging aid of yours? Is it needed or intended to be included in the code?

@@ -79,6 +80,43 @@ NotificationService::~NotificationService()
delete m_logger;
}

bool NotificationService::connectToStorage(std::map<std::thread::id, std::atomic<int>>* m)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add doxygen header comment

if (getStorageServiceRestartPendingFlag())
{
PRINT_FUNC;
#if 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this? If so add something that is more descriptive than if 1

#endif
PRINT_FUNC;

#if 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Likewise, if it is obsolete remove it or if it has h=use use a descriptive #if


PRINT_FUNC;

#if 0
Copy link
Contributor

Choose a reason for hiding this comment

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

As above

PRINT_FUNC;
#endif

#if 1
Copy link
Contributor

Choose a reason for hiding this comment

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

As above

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