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

logging: remove unuseful fsync #512

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

giuseppe
Copy link
Member

@giuseppe giuseppe commented Jul 4, 2024

the file is going to be removed few lines later with rename():

	/* Replace the previous file */
	if (rename(k8s_log_path_tmp, k8s_log_path) < 0) {
		pexit("Failed to rename log file");
	}

so there is no point in the expensive sync call since the file is not supposed to be persisted after a reboot.

the file is going to be removed few lines later with rename():

```
	/* Replace the previous file */
	if (rename(k8s_log_path_tmp, k8s_log_path) < 0) {
		pexit("Failed to rename log file");
	}
```

so there is no point in the expensive sync call since the file is not
supposed to be persisted after a reboot.

Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe
Copy link
Member Author

giuseppe commented Jul 9, 2024

@haircommander PTAL

@haircommander
Copy link
Collaborator

we did hit issues in the past removing an fsync but I think it was because of the other one before the container exits. this should be okay

@haircommander haircommander merged commit a500cbd into containers:main Jul 9, 2024
25 of 27 checks passed
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