소스 검색

Merge pull request #1221 from vrischmann/fix-new-batch

session: NewBatch needs a valid speculation execution policy
Alex Lourie 7 년 전
부모
커밋
85b7b579d0
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      session.go

+ 5 - 1
session.go

@@ -1487,7 +1487,11 @@ type Batch struct {
 //
 // Deprecated: use session.NewBatch instead
 func NewBatch(typ BatchType) *Batch {
-	return &Batch{Type: typ, metrics: &queryMetrics{m: make(map[string]*hostMetrics)}}
+	return &Batch{
+		Type:    typ,
+		metrics: &queryMetrics{m: make(map[string]*hostMetrics)},
+		spec:    &NonSpeculativeExecution{},
+	}
 }
 
 // NewBatch creates a new batch operation using defaults defined in the cluster