8000 Move async task cleanup before transaction destruction by jbajic · Pull Request #21734 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Move async task cleanup before transaction destruction #21734

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

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from

Conversation

jbajic
Copy link
Contributor
@jbajic jbajic commented Apr 28, 2025

Scope & Purpose

Move the cleanup of async prefetch tasks before we invalidate the transaction, since there might be a possibility that some async prefetch tasks might use the transaction object.

  • 💩 Bugfix
  • 🍕 New feature
  • 🔥 Performance improvement
  • 🔨 Refactoring/simplification

Checklist

  • Tests
    • Regression tests
    • C++ Unit tests
    • integration tests
    • resilience tests
  • 📖 CHANGELOG entry made
  • 📚 documentation written (release notes, API changes, ...)
  • Backports
    • Backport for 3.12.0: (Please link PR)
    • Backport for 3.11: (Please link PR)
    • Backport for 3.10: (Please link PR)

Related Information

(Please reference tickets / specification / other PRs etc)

  • Docs PR:
  • Enterprise PR:
  • GitHub issue / Jira ticket:
  • Design document:

@jbajic jbajic self-assigned this Apr 28, 2025
@cla-bot cla-bot bot added the cla-signed label Apr 28, 2025
@jbajic jbajic requested a review from goedderz April 28, 2025 08:14
for (auto it = _blocks.rbegin(); it != _blocks.rend(); ++it) {
(*it)->stopAsyncTasks();
}
stopAsyncTasks();
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
stopAsyncTasks();

This can and should be deleted now, or am I overlooking something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, but I think in practice this will just call the stopAsyncTasks and should do nothing since there should be no async task to loop through.

But that is built under the assumption that the ExecutionEngine dtor will always be called after we have cleaned up the async tasks. That's why I deliberately left it, since it should be the responsibility of ExecutionEngine to do its own cleanup, and if somebody else did it before, that is also fine. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0