瀏覽代碼

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