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
Update README for continuous aggregates #2405
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2405 +/- ##
==========================================
+ Coverage 88.91% 90.09% +1.18%
==========================================
Files 212 213 +1
Lines 34788 34300 -488
==========================================
- Hits 30932 30904 -28
+ Misses 3856 3396 -460
Continue to review full report at Codecov.
|
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.
Looks good to me. Maybe one suggestion is to rename Readme.md
to a more common README.md
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.
Just a few things that I think would make the text easier to follow:
- Change the order of the object list so that the references refer to previously introduced concepts.
- You talk about "below" and "above" for timestamps. I would suggest to consistently use "older" and "newer", or "before" and "after". It is not clear what "below" and "above" means for timestamps.
tsl/src/continuous_aggs/Readme.md
Outdated
instead. Write amplification is further reduced by never writing | ||
invalidations that modify time ranges that are more recent the current | ||
invalidation threshold. |
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 clear why this reduces write amplification.
b5381fc
to
9620db3
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.
Looks good. Some suggestions for improvements.
tsl/src/continuous_aggs/Readme.md
Outdated
5. An invalidation threshold, which tracks how "far" the | ||
materialization has reached and below which invalidations must be | ||
logged. |
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.
5. An invalidation threshold, which tracks how "far" the | |
materialization has reached and below which invalidations must be | |
logged. | |
5. An invalidation threshold, which is a timestamp that tracks the latest | |
materialization. Invalidations before this timestamp will be | |
logged, but invalidations after this point will not be added to the invalidation log. |
tsl/src/continuous_aggs/Readme.md
Outdated
allows write amplification to be kept to a minimum by, e.g, never | ||
refreshing the most recent time bucket that is still being "filled". |
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.
Are there any other things we currently do? Otherwise, just write what we do.
allows write amplification to be kept to a minimum by, e.g, never | |
refreshing the most recent time bucket that is still being "filled". | |
allows write amplification to be kept to a minimum by not | |
refreshing the most recent time bucket, which is assumed to still have data being added to it. |
tsl/src/continuous_aggs/Readme.md
Outdated
6. A trigger on the source hypertable that invalidates regions of data | ||
in every transaction, based on INSERT, UPDATE, and DELETE | ||
statements. The trigger writes its invalidations to the hypertable | ||
invalidation log. |
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 doesn't actually invalidate the regions, it just writes an invalidation record to the log. IMHO, it is better to be specific here.
6. A trigger on the source hypertable that invalidates regions of data | |
in every transaction, based on INSERT, UPDATE, and DELETE | |
statements. The trigger writes its invalidations to the hypertable | |
invalidation log. | |
6. A trigger on the source hypertable that writes invalidations of data | |
for every transaction, based on INSERT, UPDATE, and DELETE | |
statements. The trigger writes its invalidations to the hypertable | |
invalidation log. |
8. A materialization invalidation log. Once a refresh runs on a given | ||
continuous aggregate, this log tracks how invalidations from the | ||
hypertable invalidation log are processed against the refresh | ||
window for the refreshed continuous aggregate. Thus, a single | ||
invalidation in the hypertable invalidation log becomes one entry | ||
per continuous aggregate in the materialization invalidation log. |
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.
8. A materialization invalidation log. Once a refresh runs on a given | |
continuous aggregate, this log tracks how invalidations from the | |
hypertable invalidation log are processed against the refresh | |
window for the refreshed continuous aggregate. Thus, a single | |
invalidation in the hypertable invalidation log becomes one entry | |
per continuous aggregate in the materialization invalidation log. | |
8. A materialization invalidation log for each continuous aggregate. Once a refresh runs on a given | |
continuous aggregate, this log tracks how invalidations from the | |
hypertable invalidation log are processed against the refresh | |
window for the refreshed continuous aggregate. Thus, a single | |
invalidation in the hypertable invalidation log becomes one entry | |
per continuous aggregate in the materialization invalidation log. |
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.
There is only one log, and your suggestion could be interpreted as if there is one log per cagg.
Mutating transactions must record their mutations in the invalidation | ||
log, so that a refresh knows to re-materialize the invalidated | ||
range. This happens by installing a trigger on the source hypertable | ||
when the first continuous aggregate on that hypertable is created. |
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.
Mutating transactions must record their mutations in the invalidation | |
log, so that a refresh knows to re-materialize the invalidated | |
range. This happens by installing a trigger on the source hypertable | |
when the first continuous aggregate on that hypertable is created. | |
Mutating transactions must record their mutations in the invalidation | |
log for the hypertable, so that a refresh knows to re-materialize the invalidated | |
range. This happens by installing a trigger on the source hypertable | |
when the first continuous aggregate on that hypertable is created. |
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.
Again, your suggestion could be interpreted as if there is one log per hypertable, which is not the case.
The README that gives an overview of the implementation of continuous aggregates is updated to reflect changes to the feature. Fixes timescale#2147
9620db3
to
a3a28a7
Compare
The README that gives an overview of the implementation of continuous
aggregates is updated to reflect changes to the feature.
Fixes #2147