Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1577 from grafana/update-gocql-again
Browse files Browse the repository at this point in the history
update gocql to 1982a06ad6b987c24beec15336019914d71b2e31
  • Loading branch information
robert-milan authored Dec 20, 2019
2 parents ca0897f + cb83a93 commit c7ed42c
Show file tree
Hide file tree
Showing 28 changed files with 3,299 additions and 1,113 deletions.
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ unused-packages = true

[[constraint]]
name = "github.com/gocql/gocql"
revision = "d9815cdf0ff24e2efa9b8062f4f94a6dd347ae51"
revision = "1982a06ad6b987c24beec15336019914d71b2e31"

[[constraint]]
name = "github.com/golang/snappy"
Expand Down
6 changes: 4 additions & 2 deletions cmd/mt-store-cp-experimental/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,10 @@ func worker(id int, jobs <-chan string, wg *sync.WaitGroup, sourceSession, destS
if *verbose {
log.Printf("id=%d processing rownum=%d table=%q key=%q ts=%d query=%q data='%x'\n", id, atomic.LoadUint64(&doneRows)+1, tableIn, key, ts, query, data)
}

batch.Query(insertQuery, data, key, ts, ttl)
// As 'data' is re-used for each scan, we need to make a copy of the []byte slice before assigning it to a new batch.
safeData := make([]byte, len(data))
copy(safeData, data)
batch.Query(insertQuery, safeData, key, ts, ttl)

if batch.Size() >= *maxBatchSize {
if *verbose {
Expand Down
5 changes: 4 additions & 1 deletion store/cassandra/cassandra.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,10 @@ func (c *CassandraStore) SearchTable(ctx context.Context, key schema.AMKey, tabl
if len(b) < 2 {
return itgens, errChunkTooSmall
}
itgen, err := chunk.NewIterGen(uint32(t0), intervalHint, b)
// As 'b' is re-used for each scan, we need to make a copy of the []byte slice before assigning it to a new IterGen.
safeBytes := make([]byte, len(b))
copy(safeBytes, b)
itgen, err := chunk.NewIterGen(uint32(t0), intervalHint, safeBytes)
if err != nil {
return itgens, err
}
Expand Down
13 changes: 13 additions & 0 deletions vendor/github.com/gocql/gocql/AUTHORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 50 additions & 18 deletions vendor/github.com/gocql/gocql/cluster.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c7ed42c

Please sign in to comment.