Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
24612: workload: tpcc: fix partitioning of history table r=arjunravinarayan a=arjunravinarayan The previous partitioning code was incorrectly ported from loadgen, as the Cockroach UUID library doesn't work with a direct SetBytes. The previous code panicked with the following error: ``` panic: Couldn't exec ALTER TABLE history PARTITION BY RANGE (rowid) ( PARTITION p0 VALUES FROM ('00000000-0000-0000-0000-000000000000') to ('00000000-0000-0000-0000-000000000000'), PARTITION p1 VALUES FROM ('00000000-0000-0000-0000-000000000000') to ('00000000-0000-0000-0000-000000000000'), PARTITION p2 VALUES FROM ('00000000-0000-0000-0000-000000000000') to ('00000000-0000-0000-0000-000000000000'), PARTITION p3 VALUES FROM ('00000000-0000-0000-0000-000000000000') to ('00000000-0000-0000-0000-000000000000'), PARTITION p4 VALUES FROM ('00000000-0000-0000-0000-000000000000') to ('00000000-0000-0000-0000-000000000000'), PARTITION p5 VALUES FROM ('00000000-0000-0000-0000-000000000000') to ('00000000-0000-0000-0000-000000000000'), PARTITION p6 VALUES FROM ('00000000-0000-0000-0000-000000000000') to ('00000000-0000-0000-0000-000000000000'), PARTITION p7 VALUES FROM ('00000000-0000-0000-0000-000000000000') to ('00000000-0000-0000-0000-000000000000'), PARTITION p8 VALUES FROM ('00000000-0000-0000-0000-000000000000') to ('00000000-0000-0000-0000-000000000000'), PARTITION p9 VALUES FROM ('00000000-0000-0000-0000-000000000000') to ('ffffffff-ffff-ffff-ffff-ffffffffffff') ) : pq: PARTITION p0: empty range: lower bound ('00000000-0000-0000-0000-000000000000') is equal to upper bound ('00000000-0000-0000-0000-000000000000') ``` The modified code partitions successfully. Co-authored-by: Arjun Narayan <[email protected]>
- Loading branch information