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

Bugfix to deal with lost tasks after bad transfers #331

Closed
wants to merge 4 commits into from

Conversation

wtoorop
Copy link
Member

@wtoorop wtoorop commented May 15, 2024

The issue is that updating the database from transfers and other tasks that change the database (such as adding zones or changing patterns) are processed in so called task list. Especially applying transfers are executed batch-wise periodically as configured by xfrd-reload-timeout: (default every second). If a zone is added it is appended to the tasklist. If there would have been an "apply transfer task" before that other (adding a zone) task, then that will be executed first. If the "apply transfer task" fails, the reload will be aborted (because the database could be corrupt) and the effect of any tasks before or after the transfer are undone. This can lead to a situation that the transfer daemon (xfrd) thinks a zone is configured, but the zone is not configured in the server process (main).

@wtoorop wtoorop marked this pull request as draft May 15, 2024 19:01
If the task list also contained non transfer tasks
Less global state.
Appending results for the transfer daemon to results from 1st round.
@wtoorop wtoorop marked this pull request as ready for review May 19, 2024 12:47
Copy link
Member

@wcawijngaards wcawijngaards left a comment

Choose a reason for hiding this comment

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

The code looks nice. After reload step one, the xfrd->reload_pid variable is not assigned to a new value, where it would be set to the new reload process value in current code. After the reload completes the second step, the xfrd->reload_pid has a value, and that is fine. But just after step one it points to a deleted process, I think.

@@ -0,0 +1,18 @@
BaseName: tasks_after_bad_xfr
Version: 1.0
Description: Catalog zones testing
Copy link
Member

Choose a reason for hiding this comment

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

Copy and paste mistake.

Suggested change
Description: Catalog zones testing
Description: Test tasks after bad transfers

It would be a good idea to merge squash some commits, because a lot of earlier
changes are just undone.
@wtoorop
Copy link
Member Author

wtoorop commented May 25, 2024

Sorry @wcawijngaards and @k0ekk0ek if you already reviewed. I think this can be very much simplified. A new (better) proposal is in PR #332 .

@wtoorop wtoorop closed this May 25, 2024
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