Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5EAFB200B99 for ; Wed, 5 Oct 2016 11:02:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5D397160AEA; Wed, 5 Oct 2016 09:02:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9B7D6160ADB for ; Wed, 5 Oct 2016 11:02:22 +0200 (CEST) Received: (qmail 53160 invoked by uid 500); 5 Oct 2016 09:02:21 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 53146 invoked by uid 99); 5 Oct 2016 09:02:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2016 09:02:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 844A82C002D for ; Wed, 5 Oct 2016 09:02:21 +0000 (UTC) Date: Wed, 5 Oct 2016 09:02:21 +0000 (UTC) From: "Robert Stupp (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-12729) Cassandra-Stress: Use single seed in UUID generation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 05 Oct 2016 09:02:23 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-12729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Stupp updated CASSANDRA-12729: ------------------------------------- Status: Open (was: Ready to Commit) (revert change by anonymous) > Cassandra-Stress: Use single seed in UUID generation > ---------------------------------------------------- > > Key: CASSANDRA-12729 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12729 > Project: Cassandra > Issue Type: Bug > Components: Tools > Reporter: Chris Splinter > Priority: Minor > Fix For: 3.x > > Attachments: CASSANDRA-12729-trunk.patch > > > While testing the [new sequence distribution|https://issues.apache.org/jira/browse/CASSANDRA-12490] for the user module of cassandra-stress I noticed that half of the expected rows (848 / 1696) were produced when using a single uuid primary key. > {code} > table: player_info_by_uuid > table_definition: | > CREATE TABLE player_info_by_uuid ( > player_uuid uuid, > player_full_name text, > team_name text, > weight double, > height double, > position text, > PRIMARY KEY (player_uuid) > ) > columnspec: > - name: player_uuid > size: fixed(32) # no. of chars of UUID > population: seq(1..1696) # 53 active players per team, 32 teams = 1696 players > insert: > partitions: fixed(1) # 1 partition per batch > batchtype: UNLOGGED # use unlogged batches > select: fixed(1)/1 # no chance of skipping a row when generating inserts > {code} > The following debug output showed that we were over-incrementing the seed > {code} > SeedManager.next.index: 341824 > SeriesGenerator.Seed.next: 0 > SeriesGenerator.Seed.start: 1 > SeriesGenerator.Seed.totalCount: 20 > SeriesGenerator.Seed.next % totalCount: 0 > SeriesGenerator.Seed.start + (next % totalCount): 1 > PartitionOperation.ready.seed: org.apache.cassandra.stress.generate.Seed@1 > DistributionSequence.nextWithWrap.next: 0 > DistributionSequence.nextWithWrap.start: 1 > DistributionSequence.nextWithWrap.totalCount: 20 > DistributionSequence.nextWithWrap.next % totalCount: 0 > DistributionSequence.nextWithWrap.start + (next % totalCount): 1 > DistributionSequence.nextWithWrap.next: 1 > DistributionSequence.nextWithWrap.start: 1 > DistributionSequence.nextWithWrap.totalCount: 20 > DistributionSequence.nextWithWrap.next % totalCount: 1 > DistributionSequence.nextWithWrap.start + (next % totalCount): 2 > Generated uuid: 00000000-0000-0001-0000-000000000002 > {code} > This patch fixes this issue by calling {{identityDistribution.next()}} once [instead of twice|https://github.com/apache/cassandra/blob/trunk/tools/stress/src/org/apache/cassandra/stress/generate/values/UUIDs.java/#L37] when generating UUID's -- This message was sent by Atlassian JIRA (v6.3.4#6332)