-
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
Gitlw/migrate increment #2955
Gitlw/migrate increment #2955
Conversation
51683bb
to
71092ba
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.
Few comments.
Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @gitlw)
dgraph/cmd/root.go, line 70 at r1 (raw file):
var subcommands = []*x.SubCommand{ &bulk.Bulk, &cert.Cert, &conv.Conv, &live.Live, &alpha.Alpha, &zero.Zero, &version.Version, &debug.Debug, &increment.Increment,
Call the package counter. So, it would be counter.Increment.
dgraph/cmd/increment/increment.go, line 20 at r1 (raw file):
// successful, it would print out the incremented value. It assumes that it has // access to UID=0x01, and that `val` predicate is of type int. package increment
counter
dgraph/cmd/increment/increment.go, line 42 at r1 (raw file):
Increment.Cmd = &cobra.Command{ Use: "increment", Short: "increment a counter transactionally",
Capital i.
dgraph/cmd/increment/increment.go, line 52 at r1 (raw file):
flag.Int("num", 1, "How many times to run.") flag.Bool("ro", false, "Only read the counter value, don't update it.") flag.Duration("wait", 0*time.Second, "How long to wait.")
This has to be a string, no? So, we can pass wait=1s
?
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 4 files reviewed, 4 unresolved discussions (waiting on @manishrjain)
dgraph/cmd/root.go, line 70 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
Call the package counter. So, it would be counter.Increment.
Done.
dgraph/cmd/increment/increment.go, line 20 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
counter
Done.
dgraph/cmd/increment/increment.go, line 42 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
Capital i.
Done.
dgraph/cmd/increment/increment.go, line 52 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
This has to be a string, no? So, we can pass
wait=1s
?
Yes, we can do --wait=1s if it's a Duration.
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 4 of 4 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved
This change is