-
Notifications
You must be signed in to change notification settings - Fork 8
improve observability a bit, simplify sink #1017
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
Conversation
tryLogCurrentException(__PRETTY_FUNCTION__, "Exception is in export part task"); | ||
|
||
std::lock_guard inner_lock(export_manifests_mutex); | ||
writePartLog( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what is going on here... Are you trying to do the same thing in case writePartLog
throws? Or is it only exec.execute()
that can throw in this context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should only be exec.execute()
that throws. And we need to write the log in both cases
Co-authored-by: filimonov <[email protected]>
} | ||
catch (const Exception &) | ||
{ | ||
tryLogCurrentException(__PRETTY_FUNCTION__, "Exception is in export part task"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe smth like:
tryLogCurrentException(__PRETTY_FUNCTION__, "Exception is in export part task"); | |
tryLogCurrentException(__PRETTY_FUNCTION__, fmt::format("while exporting the part {}. User should retry.", manifest.data_part->name)); |
M(Merge, "Number of executing background merges") \ | ||
M(MergeParts, "Number of source parts participating in current background merges") \ | ||
M(Move, "Number of currently executing moves") \ | ||
M(Export, "Number of currently executing exports") \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would probably add few counters to profile events smth like
PartsExports (counter of successfull exports)
PartsExportFailures (counter of exports with exception)
PartsExportDuplicated (when target exists)
PartsExportBytes (sum of the bytes written by exports)
PartsExportTotalMilliseconds (overall time of exports)
(Names - if you will have better ideas - feel free :) )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added these except for PartsExportBytes
because I still don't have the writing stats integrated.
If you can populate ProfileEvents -it would be awesome. (it also strored in thread context, probably not too hard to add but not 100% sure, but it's not a blocker, can go w/o) Additionally i would like to see in system.exports the target file name. Ideally in the part_log too (maybe reuse path_on_disk column?) |
Also added the setting to overwrite the file |
Implementation overview ---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
ExportsList *--> "*" ExportsListElement
ExportsListElement *--> ThreadGroup
ContextShared *--> ExportsList
Context --> ExportsList : exposes
ExportsListElement --> ExportInfo : creates
StorageSystemExports --> ExportInfo : reads
MergeTreeData "*" *--> MergeTreeExportManifest
MergeTreeData --> ExportsList : adds elemets
|
That seems about right |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
improve observability a bit, simplify sink
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Documentation entry for user-facing changes
...
Exclude tests: