Browse Source

fix: use session consistency (#1422)

Songyan Ho 5 years ago
parent
commit
6d895e38b0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      conn.go

+ 1 - 1
conn.go

@@ -1232,7 +1232,7 @@ func (c *Conn) AvailableStreams() int {
 
 func (c *Conn) UseKeyspace(keyspace string) error {
 	q := &writeQueryFrame{statement: `USE "` + keyspace + `"`}
-	q.params.consistency = Any
+	q.params.consistency = c.session.cons
 
 	framer, err := c.exec(c.ctx, q, nil)
 	if err != nil {