From: Graeme Wallace Date: November 28 2012 12:01am Subject: Re: Problem with multithreading and ClusterJ List-Archive: http://lists.mysql.com/cluster/8445 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b66f329a04dd704cf82dc62 --047d7b66f329a04dd704cf82dc62 Content-Type: text/plain; charset=ISO-8859-1 Ok - shoot me in the head. I was playing around with EXPLAIN PARTITIONS and ended up dumping some data that didnt look right So i checked my test and sure enough when i created the Runnable object to put on the work queue i had forgotten to set the flightnumbers, which is the 2nd part of the primary key. So there ended up being hundreds of duplicate keys because only routeKey1 was unique. Apologies, Graeme On Tue, Nov 27, 2012 at 3:11 PM, Craig L Russell wrote: > Hi Graeme, > > On Nov 27, 2012, at 1:56 PM, Graeme Wallace wrote: > > In my test I'm guaranteeing that keys are unique to avoid the scenario you >> described. >> >> As far as partitioning is concerned - I'm guessing that i should create >> the >> table to partition by routeKey1 - as i would expect to query the table >> based on ranges of those keys. However, how do i determine at runtime what >> partition a particular key will be stored in ? >> > > There is an api that could be used, but it's not exposed through clusterj. > > It's possible to add an API to clusterj by which you could find out the > partition, but I'd like to get some more feedback from others on the > cluster team whether it would make any difference to performance if you did > so. > > Craig > >> >> >> >> -- >> Graeme Wallace >> CTO >> FareCompare.com >> O: 972 588 1414 >> M: 214 681 9018 >> > > Craig L Russell > Architect, Oracle > http://db.apache.org/jdo > 408 276-5638 mailto:Craig.Russell@oracle.**com > P.S. A good JDO? O, Gasp! > > -- Graeme Wallace CTO FareCompare.com O: 972 588 1414 M: 214 681 9018 --047d7b66f329a04dd704cf82dc62--