Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

illia-li
Copy link
Contributor

Us part of solution #354 (comment).
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%.

@illia-li illia-li force-pushed the il/fix-jobs-fix_wrong_logic_genMultiplePartitionQuery branch from b8d3770 to 34580f6 Compare July 12, 2023 19:28
@illia-li illia-li marked this pull request as ready for review July 12, 2023 19:31
@illia-li illia-li force-pushed the il/fix-jobs-fix_wrong_logic_genMultiplePartitionQuery branch 2 times, most recently from 8ea0985 to 6293683 Compare July 13, 2023 19:03
@illia-li illia-li force-pushed the il/fix-jobs-fix_wrong_logic_genMultiplePartitionQuery branch from 6293683 to 86296e8 Compare July 13, 2023 19:18
@dkropachev dkropachev self-requested a review July 14, 2023 01:32
@dkropachev dkropachev merged commit 7e88328 into scylladb:master Jul 14, 2023
@illia-li illia-li deleted the il/fix-jobs-fix_wrong_logic_genMultiplePartitionQuery branch July 14, 2023 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants