-
Notifications
You must be signed in to change notification settings - Fork 317
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
feat: rudder-server modification to use suppression-backup service. #3116
Conversation
b1d81c6
to
d7c3daa
Compare
0e6f795
to
e4b0ffb
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3116 +/- ##
==========================================
+ Coverage 52.28% 52.40% +0.11%
==========================================
Files 321 322 +1
Lines 52789 52944 +155
==========================================
+ Hits 27602 27745 +143
+ Misses 23527 23526 -1
- Partials 1660 1673 +13 ☔ View full report in Codecov by Sentry. |
989c896
to
0ecef29
Compare
ea4c7ba
to
e934561
Compare
c9abdb8
to
f32f95b
Compare
0f5f795
to
e7c70ec
Compare
if err == nil { | ||
return | ||
} | ||
m.Log.Errorf("retry failed: %v", err) |
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 feels like it would be better to log the error in the anonymous function instead of logging it here. This way we can add some context to the error like:
m.retryIndefinitely(ctx, func() error {
if _, err = os.Create(filepath.Join(fullSuppressionPath, model.SyncDoneMarker)); err != nil {
return fmt.Errorf("could not create sync marker: %v", err)
}
return nil
}, 1*time.Second)
Also, I'm not sure trying these ops forever without anybody looking at the logs is a good idea.
For example, let's say that it fails forever at the 2nd step (i.e. fullSyncer.Sync(ctx)
). How are we going to notice?
cc @atzoum
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.
Alerting for sync failures is something we are missing for the whole suppression feature (not just for this scenario). Let's treat alerting in another task
…ath is already present
e06fa31
to
8bf9f2e
Compare
Description
Modified rudder-server suppression component to make use of
suppression-backup-service
to get latest & complete user suppression list instead of syncing with data-regulation-service. This modification would result is drastically reducing the suppression sync time at gateway.Here, we make sure that gateway starts once we have the latest users suppressions. Also, we start getting the full suppression list asynchronously in a separate badgerdb repo, since it might take sometime. Once, we have the full list in badgerdb. We simply swap the old badgerdb (with latest users) with the new badgerdb (with all users).
Notion Ticket
https://www.notion.so/rudderstacks/Speed-up-resync-of-suppress-regulations-b29f4df9d10047c7ae3ae7d80781b9bb?pvs=4