string to int signedness casting GO-E1006
Bug risk
Critical
2 months ago2 years old
string to int signedness cast "uint32(newID)", might result in lost or misinterpreted data
 503	} else if oldKG.IsMerging() {
 504		return ErrKeyspaceGroupInMerging(uint32(oldID))
 505	} else if newKG.IsMerging() {
 506		return ErrKeyspaceGroupInMerging(uint32(newID)) 507	}
 508
 509	var updateOld, updateNew bool
string to int signedness cast "uint32(oldID)", might result in lost or misinterpreted data
 501	} else if newKG.IsSplitting() {
 502		return ErrKeyspaceGroupInSplit(uint32(newID))
 503	} else if oldKG.IsMerging() {
 504		return ErrKeyspaceGroupInMerging(uint32(oldID)) 505	} else if newKG.IsMerging() {
 506		return ErrKeyspaceGroupInMerging(uint32(newID))
 507	}
string to int signedness cast "uint32(newID)", might result in lost or misinterpreted data
 492	if oldKG == nil {
 493		return errors.Errorf("keyspace group %s not found in %s group", oldGroupID, oldUserKind)
 494	}
 495	newKG := m.groups[newUserKind].Get(uint32(newID)) 496	if newKG == nil {
 497		return errors.Errorf("keyspace group %s not found in %s group", newGroupID, newUserKind)
 498	}
string to int signedness cast "uint32(oldID)", might result in lost or misinterpreted data
 488
 489	m.Lock()
 490	defer m.Unlock()
 491	oldKG := m.groups[oldUserKind].Get(uint32(oldID)) 492	if oldKG == nil {
 493		return errors.Errorf("keyspace group %s not found in %s group", oldGroupID, oldUserKind)
 494	}
string to int signedness cast "uint32(newID)", might result in lost or misinterpreted data
 499	if oldKG.IsSplitting() {
 500		return ErrKeyspaceGroupInSplit(uint32(oldID))
 501	} else if newKG.IsSplitting() {
 502		return ErrKeyspaceGroupInSplit(uint32(newID)) 503	} else if oldKG.IsMerging() {
 504		return ErrKeyspaceGroupInMerging(uint32(oldID))
 505	} else if newKG.IsMerging() {