Skip to content

Commit

Permalink
[BugFix] #104 - simulator: panic: invalid argument to Intn (#126)
Browse files Browse the repository at this point in the history
* Fix bug #104

* Minor changes based on feedback
  • Loading branch information
q131172019 authored Aug 10, 2022
1 parent 5f55c43 commit 0770f00
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions resource-management/test/resourceRegionMgrSimulator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ func main() {
flag.Parse()
}

// Input parameter error handling for c.RpNum and c.NodesPerRP
// Fix bug #104
klog.Info("")
if c.RpNum < 1 {
klog.Errorf("Error: Region resource manager simulator config / rp number per region: (%v) is less than 1", c.RpNum)
os.Exit(1)
}

if c.NodesPerRP < 1 {
klog.Errorf("Error: Region resource manager simulator config / node number per rp: (%v) is less than 1", c.NodesPerRP)
os.Exit(1)
}
klog.Info("")

// Keep a more frequent flush frequency as 1 second
klog.StartFlushDaemon(time.Second * 1)

Expand Down

0 comments on commit 0770f00

Please sign in to comment.