[skip ci]Fix allocator comment (#9030)

Signed-off-by: godchen <qingxiang.chen@zilliz.com>
This commit is contained in:
godchen 2021-10-01 22:20:18 +08:00 committed by GitHub
parent 4f33a807f2
commit 5b90868e88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@ type GIDAllocator interface {
UpdateID() error
}
// GlobalTSOAllocator is the global single point TSO allocator.
// GlobalIDAllocator is the global single point TSO allocator.
type GlobalIDAllocator struct {
allocator tso.Allocator
}
@ -46,6 +46,7 @@ func (gia *GlobalIDAllocator) Initialize() error {
return gia.allocator.Initialize()
}
// Alloc allocates the id of the count number.
// GenerateTSO is used to generate a given number of TSOs.
// Make sure you have initialized the TSO allocator before calling.
func (gia *GlobalIDAllocator) Alloc(count uint32) (typeutil.UniqueID, typeutil.UniqueID, error) {