@@ -83,7 +83,7 @@ func (o *Oracle) hasConflict(src *api.TxnContext) bool {
83
83
if src .StartTs < o .startTxnTs {
84
84
return true
85
85
}
86
- for _ , k := range src .Keys {
86
+ for k := range src .Keys {
87
87
ki , err := strconv .ParseUint (k , 36 , 64 )
88
88
if err != nil {
89
89
glog .Errorf ("Got error while parsing conflict key %q: %v\n " , k , err )
@@ -139,7 +139,7 @@ func (o *Oracle) commit(src *api.TxnContext) error {
139
139
// We store src.Keys as string to ensure compatibility with all the various language clients we
140
140
// have. But, really they are just uint64s encoded as strings. We use base 36 during creation of
141
141
// these keys in FillContext in posting/mvcc.go.
142
- for _ , k := range src .Keys {
142
+ for k := range src .Keys {
143
143
ki , err := strconv .ParseUint (k , 36 , 64 )
144
144
if err != nil {
145
145
glog .Errorf ("Got error while parsing conflict key %q: %v\n " , k , err )
@@ -367,12 +367,7 @@ func (s *Server) commit(ctx context.Context, src *api.TxnContext) error {
367
367
368
368
checkPreds := func () error {
369
369
// Check if any of these tablets is being moved. If so, abort the transaction.
370
- preds := make (map [string ]struct {})
371
-
372
- for _ , k := range src .Preds {
373
- preds [k ] = struct {}{}
374
- }
375
- for pkey := range preds {
370
+ for pkey := range src .Preds {
376
371
splits := strings .Split (pkey , "-" )
377
372
if len (splits ) < 2 {
378
373
return errors .Errorf ("Unable to find group id in %s" , pkey )
0 commit comments