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

DB IDO: Do not deactivate objects during application reload/restart #7157

Merged
merged 1 commit into from
May 3, 2019

Conversation

dnsmichi
Copy link
Contributor

@dnsmichi dnsmichi commented May 3, 2019

This follows the same principle as with the shutdown handler,
and was introduced with the changed reload handling with 2.9.
Previously IsShuttingDown() was sufficient which got set at one
location.

SigUsr2 as handler introduced a new location where m_ShuttingDown
is not necessarily set yet. Since this handler gets called when
l_Restarting is enabled, we'll use this flag to avoid config update
events resulting in object deactivation (object->IsActive() always
returns false).

Full analysis and test protocol: #7125 (comment)

refs #5996
refs #6691
refs #6970

fixes #7125

This follows the same principle as with the shutdown handler,
and was introduced with the changed reload handling with 2.9.
Previously IsShuttingDown() was sufficient which got set at one
location.

SigUsr2 as handler introduced a new location where m_ShuttingDown
is not necessarily set yet. Since this handler gets called when
l_Restarting is enabled, we'll use this flag to avoid config update
events resulting in object deactivation (object->IsActive() always
returns false).

refs #5996
refs #6691
refs #6970

fixes #7125
@dnsmichi dnsmichi added this to the 2.11.0 milestone May 3, 2019
@dnsmichi dnsmichi added bug Something isn't working area/db-ido Database output labels May 3, 2019
@dnsmichi dnsmichi self-assigned this May 3, 2019
@dnsmichi dnsmichi merged commit 7dfd353 into master May 3, 2019
@dnsmichi dnsmichi deleted the bugfix/ido-conn-prevent-deactivate-on-reload branch May 3, 2019 14:52
@dnsmichi dnsmichi modified the milestones: 2.11.0, 2.10.5 May 16, 2019
@dnsmichi dnsmichi added the backported Fix was included in a bugfix release label May 16, 2019
@Crunsher
Copy link
Contributor

Crunsher commented May 22, 2019

I tested 2.10.4 with the debug message introduced in this PR and the support branch and triggered reloads over signals. 100k Hosts, 100k Services. Output is as excepted:
2.10.4:
[2019-05-22 11:09:01 +0200] critical/DbConnection: Updating object 'TestHost - 12564!TestService - 12564' active '0' shutting down '1' restarting '1'.

2.10.5:
[2019-05-22 11:12:41 +0200] critical/DbConnection: Updating object 'TestHost - 12564!TestService - 12564' active '1' shutting down '0' restarting '1'.

@N-o-X
Copy link
Contributor

N-o-X commented May 22, 2019

Can confirm, works as intended. Tested this with reloads triggered via API and got the same result @Crunsher described.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/db-ido Database output backported Fix was included in a bugfix release bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Objects are removed from IDO during reload with config change
3 participants