Fix job statistics bugs and improve docs - #882
Open
bgunebakan wants to merge 10 commits into
Open
Conversation
3 tasks
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…and add unit tests for data integrity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the changes / Why this is an improvement
Investigating #871 showed that
ctk info jobsandctk cfr jobstatsare not two implementations of the same thing, so this PR does not consolidate them.ctk info jobstakes a one-shot snapshot and lets CrateDB aggregate it in SQL, whilectk cfr jobstatspolls continuously and accumulates call counters, duration histograms, and a decaying average in Python, so statistics outlive the boundedsys.jobs_log.it is very difficult to understand which command does what from the documentation"*. So this PR keeps both engines, documents what each one is for, and fixes the bugs found while reading them.
Bug fixes
collect --anonymize <file>was declaredis_flag=True, so passing the decoder dictionary path the help text advertised failed outright.collect --anonymizefell back to the original statement when anonymization raised, storing in clear text exactly what the option exists to protect. Such statements are now redacted to a stable digest, so the option fails closed.view --deanonymizeemitted unparseable output.view --deanonymizereported every statement twice.viewmixed up fields, reporting the average duration as the duration histogram, the histogram as the user, and the user as the query type.collectcounted a job twice when it ended exactly on the watermark millisecond.collectderived its watermark from an arbitrary record whenever the watermark table held more than one.collectnever resumed where a previous run left off. the watermark was written but never read back.collectlost statistics when started twice within one process.reportanduirefused to run whenever statistics had been collected into a schema other thanstats.top100_countaliasedPERCENTILE(..., 0.99)asp90. The value was always the 99th percentile, only the label was wrong. The field is namedp99now, which breaks consumers readingp90.Checklist
ctk info jobsvsctk cfr jobstats) #871CHANGES.md