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
Fix ts_get_now_internal to use transaction time #2235
Conversation
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 think the current behaviour is intentional and not a bug
Codecov Report
@@ Coverage Diff @@
## master #2235 +/- ##
==========================================
+ Coverage 89.94% 90.28% +0.33%
==========================================
Files 211 212 +1
Lines 34262 34471 +209
==========================================
+ Hits 30818 31123 +305
+ Misses 3444 3348 -96
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.
This seems more correct than the current implementation, but given Sven's objection we should probably discuss this during a group meeting.
FWIW, this now-replacement is used in two places in the continuous aggregate code: first to set the modification time for invalidations in the insert trigger, then in the materializer to calculate the end of the range to materialize. IMO, transaction time makes sense in both of these cases. |
@svenklemm any thoughts, suggestions? |
since caggs seems to be only user of this function i guess its no problem to change it to whatever makes most sense for current caggs |
Related Issue: #2167
Not really sure how to test it, since we not exported this function. If necessary I guess I could make a test c function to wrap it up and then check that the result of it does not change when executed inside an active transaction more then once.