-
Notifications
You must be signed in to change notification settings - Fork 439
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
Calculate synthetic size worker #3123
Conversation
82180e7
to
c66d695
Compare
c66d695
to
ca50d76
Compare
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.
Apologies, had missed the github notification. I think this could just as well live outside the tenant, in metric collection.
3e0e4a3
to
dbb6eb4
Compare
2e2e745
to
38d5278
Compare
38d5278
to
67f215c
Compare
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 is not explained why it was decided to calculate logical size in background.
Before it is calculated incrementally.
May be I missed something but logical=synthetic size is one we are limiting for free tier and what customers are paying for. If so, is it acceptable to calculate it once per 10 minutes?
So I do some massive insert, what to check used size but see... old value.
Once again sorry if it is explained somewhere and I just missed it.
synthetic size calculation. Add new pageserver config param calculate_synthetic_size_interval
sort updates in topological order so that the parent timeline always preceeds its children. fixes #3179
- handle errors in calculate_synthetic_size_worker. Don't exit the bgworker if one tenant failed. - add cached_synthetic_tenant_size to cache values calculated by the bgworker - code cleanup: remove unneeded info! messages, clean comments - handle collect_metrics_task() error. Don't exit collect_metrics worker if one task failed. - add unit test to cover case when we have multiple branches at the same lsn
67f215c
to
e840170
Compare
We still track logical size at the end of the branch incrementally. However, the synthetic size calculation needs the logical size at an older point in time.
Logical size is different from the synthetic size.
We don't have a good explanation of synthetic size anywhere, so the confusion is understandable. I wrote a small doc on what the synthetic size is: #3328. It needs more work, but I hope it helps. |
New version of the PR contains following changes:
calculate_synthetic_size_interval
should had found the parent
#3179TODO:
test_metric_collection_multiple_branches
. It is there only to illustrate the bug.info!
messages)