A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vmware/docker-volume-vsphere/issues/1344 below:

Some e2e util functions are not generating unique numbers properly · Issue #1344 · vmware-archive/vsphere-storage-for-docker · GitHub

The following util functions are buggy:

  1. GetVolumeNameWithTimeStamp
  2. GetContainerNameWithTimeStamp
  3. GetServiceNameWithTimeStamp

The intention of these functions is to generate a unique name, but we are using time.Now().Unix() which generates a number based on the same timestamp in seconds. The generated number will not be unique if we call this function multiple times in a short period or from different goroutines. It won't work even if we change it to time.Now().UnixNano().

We should fix these functions to use random number generator.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4