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

[native] Improve Zombie Tasks logging. #22607

Merged
merged 1 commit into from Apr 30, 2024

Conversation

spershin
Copy link
Contributor

Description

  1. Only get task info (toString) if really needed.
  2. Log also the number of extra references.
  3. Log the type of Task for each task.

If release note is NOT required, use:

== NO RELEASE NOTE ==

@spershin spershin requested a review from a team as a code owner April 24, 2024 22:03
xiaoxmeng
xiaoxmeng previously approved these changes Apr 25, 2024
Copy link
Contributor

@xiaoxmeng xiaoxmeng left a comment

Choose a reason for hiding this comment

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

@spershin thanks for the improvement % nits.

presto-native-execution/presto_cpp/main/TaskManager.cpp Outdated Show resolved Hide resolved
presto-native-execution/presto_cpp/main/TaskManager.cpp Outdated Show resolved Hide resolved

ZombieTaskStats(
const std::shared_ptr<exec::Task>& task,
long numExtraReferences_)
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment say the extra references could be either from velox or presto? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is conveyed on another level.
The structure has no knowledge about it.

const std::string info;
const long numExtraReferences;

ZombieTaskStats(
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Why was explicit removed? This should still be used for the construction during the emplace call like before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

explicit is was used for single-argument constructors, so there would be no implicit type conversion.

czentgr
czentgr previously approved these changes Apr 25, 2024
1. Only get task info is really needed.
2. Log also the number of extra references.
3. Log the type of Task for each task.
@spershin spershin dismissed stale reviews from czentgr and xiaoxmeng via 756ec4f April 30, 2024 02:32

ZombieTaskStats(
const std::shared_ptr<exec::Task>& task,
long _numExtraReferences)
Copy link
Contributor

Choose a reason for hiding this comment

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

s/long/uint32_t/ why long? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xiaoxmeng
Simply based on where we get them from:
const auto prestoTaskRefCount = prestoTask.use_count();
which comes from
long use_count() const _NOEXCEPT

@xiaoxmeng xiaoxmeng merged commit c437ea4 into prestodb:master Apr 30, 2024
59 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.

None yet

3 participants