Skip to content

Commit

Permalink
meta: make auto id minimum step larger (#12873) (#12891)
Browse files Browse the repository at this point in the history
  • Loading branch information
sre-bot authored Oct 23, 2019
1 parent 355e19c commit 36f5cf9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion meta/autoid/autoid.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
)

const (
minStep = 1000
minStep = 30000
maxStep = 2000000
defaultConsumeTime = 10 * time.Second
)
Expand Down
2 changes: 1 addition & 1 deletion meta/autoid/autoid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ func (*testSuite) TestNextStep(c *C) {
nextStep = autoid.NextStep(678910, 10*time.Second)
c.Assert(nextStep, Equals, int64(678910))
nextStep = autoid.NextStep(50000, 10*time.Minute)
c.Assert(nextStep, Equals, int64(1000))
c.Assert(nextStep, Equals, int64(30000))
}

func BenchmarkAllocator_Alloc(b *testing.B) {
Expand Down

0 comments on commit 36f5cf9

Please sign in to comment.