瀏覽代碼

Default a Session's consistency to that of its ClusterConfig

Oliver Beattie 10 年之前
父節點
當前提交
ac7fbafbfa
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      session.go

+ 1 - 1
session.go

@@ -40,7 +40,7 @@ type Session struct {
 
 // NewSession wraps an existing Node.
 func NewSession(p ConnectionPool, c ClusterConfig) *Session {
-	return &Session{Pool: p, cons: Quorum, prefetch: 0.25, cfg: c}
+	return &Session{Pool: p, cons: c.Consistency, prefetch: 0.25, cfg: c}
 }
 
 // SetConsistency sets the default consistency level for this session. This