-
Notifications
You must be signed in to change notification settings - Fork 25
feat: Deterministic _cq_id #712
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
⏱️ Benchmark resultsComparing with b2b8de9
|
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 will require a follow-up PR to overwrite _cq_id
and _cq_parent_id
where they've been skipped.
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #712 +/- ##
==========================================
+ Coverage 47.17% 48.87% +1.69%
==========================================
Files 70 70
Lines 6849 6877 +28
==========================================
+ Hits 3231 3361 +130
+ Misses 3167 3054 -113
- Partials 451 462 +11
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Looks good. Can we make it an opt-int option given we don't know the impact of this on compute at scale/real-world scenarios? |
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 OK with the changes. However, the problems with deterministic CQ ID for append mode in PG, MS SQL & other destinations should be addressed before this could be merged, hence requesting changes
just to block the PR merge.
@candiduslynx- I don't think we need to fix those issues prior to releasing this because the default behavior hasn't changed. Users have to opt in to change the behavior. |
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.
Sorry I missed it in prior reviews but we shouldn't use here hashstructure library. We already have a type system in place so no need for reflection. Either adding Hash
function for each of them using string
and hashing this with io.writer
and hasher
otherwise we don't really control the hashing mechanism also hashstructure will be much slower.
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.
Few non-blocking comments:
- bytes.Buffer (instead of append)
- the current slack thread - do we want to have random uuid for things without pk in any case.
🤖 I have created a release *beep* *boop* --- ## [1.41.0](v1.40.0...v1.41.0) (2023-03-02) ### Features * Deterministic _cq_id ([#712](#712)) ([2e7ad2c](2e7ad2c)) * **multiplex:** Detect duplicated clients ([#723](#723)) ([dfb039d](dfb039d)) ### Bug Fixes * Cleanup code ([#710](#710)) ([963f03c](963f03c)) * **deps:** Update golang.org/x/exp digest to c95f2b4 ([#718](#718)) ([de52c10](de52c10)) * **deps:** Update google.golang.org/genproto digest to 9b19f0b ([#719](#719)) ([ecfddea](ecfddea)) * **deps:** Update module github.com/rivo/uniseg to v0.4.4 ([#720](#720)) ([0da69b6](0da69b6)) * **deps:** Update module github.com/stretchr/testify to v1.8.2 ([#721](#721)) ([19c0742](19c0742)) * **pk:** Skip filter for no PK ([#709](#709)) ([d0c2e26](d0c2e26)) * **types-json:** Disable HTML escaping during JSON marshalling ([#714](#714)) ([2f6f1d8](2f6f1d8)) * **types-timestamp:** Ensure timestamp is UTC ([#716](#716)) ([bb33629](bb33629)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Summary
When making cq_id deterministic we cannot use any of the existing resolver types because we cannot guarantee that the value has been fetched by that time so in this PR I call a new function after the resource has been fully resolved in
resolveResource
Use the following steps to ensure your PR is ready to be reviewed
go fmt
to format your code 🖊golangci-lint run
🚨 (install golangci-lint here)