scylladb / gemini

Test data integrity by comparing against an Oracle running in parallel
Apache License 2.0
27 stars 16 forks source link

fix(jobs): fix wrong PK processing logic in genMultiplePartitionQuery funcs #390

Closed illia-li closed 11 months ago

illia-li commented 11 months ago

Us part of solution https://github.com/scylladb/gemini/issues/354#issue-1753683701. At this moment PK processig logic in genMultiplePartitionQuery funcs :

    for i, pk := range t.PartitionKeys {
        builder = builder.Where(qb.InTuple(pk.Name, numQueryPKs))
        for j := 0; j < numQueryPKs; j++ {
            vs := g.GetOld()
            if vs == nil {
                return nil
            }
            values = append(values, vs.Value[i])
            typs = append(typs, pk.Type)
    }

Which leads to generate stmt`s with failed PK values combinations and exhaust oldValues channels in generators. As result or this PR - count of responses with nil rows decreased on 20%.