-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Limit UIDs per variable in upsert #4268
Conversation
9070992
to
c82ddf3
Compare
b168008
to
96e1668
Compare
c82ddf3
to
20e3f6b
Compare
96e1668
to
257d6aa
Compare
edgraph/server.go
Outdated
for i, gmu := range qc.gmuList { | ||
isCondUpsert := strings.TrimSpace(gmu.Cond) != "" | ||
if isCondUpsert { | ||
qc.condVars[i] = fmt.Sprintf("__dgraph_%d__", rand.Int()) |
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.
G404: Use of weak random number generator (math/rand instead of crypto/rand) (from gosec
)
20e3f6b
to
a38e1da
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.
Reviewed 2 of 13 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @danielmai, @mangalaman93, @manishrjain, @MichaelJCompton, and @pawanrawal)
dgraph/cmd/alpha/upsert_test.go, line 2559 at r2 (raw file):
} // This test is supposed to be ignored by the CI
Maybe add a comment on why it should be ignored.
257d6aa
to
633c252
Compare
a38e1da
to
f2587c6
Compare
633c252
to
f5a805f
Compare
f2587c6
to
ab3ce7f
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.
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @danielmai, @mangalaman93, @martinmr, @MichaelJCompton, and @pawanrawal)
edgraph/server.go, line 996 at r3 (raw file):
// don't do bad things to alpha and mutation doesn't become too big. if len(v.Uids.Uids) > 1e6 { return resp, errors.Errorf("variable [%v] has too many UIDs (>1m)", name)
"has over million UIDs. Please narrow .. down."
8adf4d3
to
64560e6
Compare
ab3ce7f
to
4ff08f9
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.
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @danielmai, @mangalaman93, @martinmr, @MichaelJCompton, and @pawanrawal)
4ff08f9
to
6219ea0
Compare
fixes #4021
This change is