-
Notifications
You must be signed in to change notification settings - Fork 11
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 whitelist upload batching #612
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.
LGTM, just a small remark on the log level
server/api.go
Outdated
@@ -807,6 +807,8 @@ func (a *API) updateWhitelist(w http.ResponseWriter, r *http.Request) { | |||
return | |||
} | |||
|
|||
a.p.API.LogWarn("Whitelist updated", "size", len(ids)) |
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.
shouldn't this be an info?
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.
Yes, bad copy-paste. Thanks for catching!
if err = s.storeUsersInWhitelist(currentBatch, tx); err != nil { | ||
s.api.LogDebug("Error adding batched users to whitelist", "error", err.Error(), "userIds", currentBatch) | ||
return err | ||
} | ||
clear(currentBatch) | ||
currentBatch = nil |
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.
TIL clear
keeps the size!
Summary
Fix bug where whitelist uploads would fail if size >100.
Ticket Link