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

write objects.precache in tmp file first, then move it #439

Merged
merged 2 commits into from
Oct 13, 2023

Conversation

sni
Copy link
Contributor

@sni sni commented Oct 12, 2023

It's a good standard to do so and in fact, we do this already in several places, ex. the status.dat. This ensures the file is ready and completly written before it will be used.

The issue here is, that naemon starts without any issues if the precached file is empty for any reason. Except it has zero hosts/services then and removes all existing states/downtime/comments.

It's a good standard to do so and in fact, we do this already in several
places, ex. the status.dat. This ensures the file is ready and completly
written before it will be used.

The issue here is, that naemon starts without any issues if the precached file
is empty for any reason. Except it has zero hosts/services then and removes all
existing states/downtime/comments.

Signed-off-by: Sven Nierlein <[email protected]>
Copy link

@jdumalaonITRS jdumalaonITRS left a comment

Choose a reason for hiding this comment

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

LGTM. Just a minor comment in the code comment

src/naemon/objects.c Outdated Show resolved Hide resolved
left over from copy/pasted code.
@sni sni merged commit 83b25ec into naemon:master Oct 13, 2023
26 checks passed
@sni sni mentioned this pull request Dec 29, 2023
@sni sni deleted the write_objects_precache_in_tmp_file branch February 9, 2024 15:12
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.

None yet

2 participants