to avoid adding work to terminating executor (which will raise an exception) we need to check for threshold violated _first_, and move puts to the new memtable once flush has started.  patch by jbellis; reviewed by Eric Evans for CASSANDRA-165
to avoid adding work to terminating executor (which will raise an exception) we need to check for threshold violated _first_, and move puts to the new memtable once flush has started.  patch by jbellis; reviewed by Eric Evans for CASSANDRA-165

git-svn-id: 1e8683751772dd0ef52a45d586103b4a82d616ff@774165 13f79535-47bb-0310-9956-ffa450edef68

regispl/cassandra,chbatey/cassandra-1,pcn/cassandra-1,boneill42/cassandra,miguel0afd/cassandra-cqlMod,LatencyUtils/cassandra-stress2,xiongzheng/Cassandra-Research,yonglehou/cassandra,mkjellman/cassandra,asias/cassandra,Jaumo/cassandra,belliottsmith/cassandra,adelapena/cassandra,mariusae/cassandra,clohfink/cassandra,mheffner/cassandra-1,DICL/cassandra,mshuler/cassandra,nlalevee/cassandra,blerer/cassandra,rackerlabs/cloudmetrics-cassandra,whitepages/cassandra,wreda/cassandra,gdusbabek/cassandra,helena/cassandra,jasonwee/cassandra,guanxi55nba/db-improvement,likaiwalkman/cassandra,pauloricardomg/cassandra,chaordic/cassandra,macintoshio/cassandra,pthomaid/cassandra,michaelmior/cassandra,driftx/cassandra,scaledata/cassandra,bcoverston/cassandra,fengshao0907/Cassandra-Research,krummas/cassandra,sammyyu/Cassandra,pthomaid/cassandra,mklew/mmp,scaledata/cassandra,pcn/cassandra-1,Instagram/cassandra,project-zerus/cassandra,strapdata/cassandra,instaclustr/cassandra,strapdata/cassandra,michaelsembwever/cassandra,instaclustr/cassandra,cooldoger/cassandra,apache/cassandra,thobbs/cassandra,swps/cassandra,rogerchina/cassandra,Jollyplum/cassandra,iamaleksey/cassandra,michaelmior/cassandra,mike-tr-adamson/cassandra,kgreav/cassandra,mklew/mmp,qinjin/mdtc-cassandra,spodkowinski/cassandra,vramaswamy456/cassandra,pcn/cassandra-1,bcoverston/cassandra,krummas/cassandra,sayanh/ViewMaintenanceSupport,blerer/cassandra,tongjixianing/projects,kgreav/cassandra,nvoron23/cassandra,Imran-C/cassandra,pthomaid/cassandra,mheffner/cassandra-1,caidongyun/cassandra,DavidHerzogTU-Berlin/cassandraToRun,RyanMagnusson/cassandra,a-buck/cassandra,phact/cassandra,christian-esken/cassandra,michaelmior/cassandra,LatencyUtils/cassandra-stress2,segfault/apache_cassandra,asias/cassandra,a-buck/cassandra,nakomis/cassandra,guard163/cassandra,caidongyun/cassandra,christian-esken/cassandra,bcoverston/apache-hosted-cassandra,mt0803/cassandra,scylladb/scylla-tools-java,Jollyplum/cassandra,stuhood/cassandra-old,aureagle/cassandra,carlyeks/cassandra,blambov/cassandra,mariusae/cassandra,mklew/mmp,sluk3r/cassandra,matthewtt/cassandra_read,shawnkumar/cstargraph,GabrielNicolasAvellaneda/cassandra,jasonstack/cassandra,guard163/cassandra,blambov/cassandra,yanbit/cassandra,WorksApplications/cassandra,fengshao0907/Cassandra-Research,hhorii/cassandra,rackerlabs/cloudmetrics-cassandra,jrwest/cassandra,aureagle/cassandra,yhnishi/cassandra,thobbs/cassandra,yukim/cassandra,bmel/cassandra,ejankan/cassandra,aweisberg/cassandra,pkdevbox/cassandra,sriki77/cassandra,codefollower/Cassandra-Research,Stratio/stratio-cassandra,shawnkumar/cstargraph,modempachev4/kassandra,tjake/cassandra,aweisberg/cassandra,codefollower/Cassandra-Research,nutbunnies/cassandra,project-zerus/cassandra,mariusae/cassandra,fengshao0907/Cassandra-Research,chaordic/cassandra,yhnishi/cassandra,belliottsmith/cassandra,snazy/cassandra,yukim/cassandra,ibmsoe/cassandra,lalithsuresh/cassandra-c3,miguel0afd/cassandra-cqlMod,kgreav/cassandra,mashuai/Cassandra-Research,yonglehou/cassandra,mkjellman/cassandra,cooldoger/cassandra,dprguiuc/Cassandra-Wasef,josh-mckenzie/cassandra,hengxin/cassandra,nlalevee/cassandra,clohfink/cassandra,DavidHerzogTU-Berlin/cassandra,scylladb/scylla-tools-java,jeffjirsa/cassandra,aarushi12002/cassandra,instaclustr/cassandra,heiko-braun/cassandra,mike-tr-adamson/cassandra,tommystendahl/cassandra,Stratio/cassandra,jsanda/cassandra,nakomis/cassandra,DikangGu/cassandra,yanbit/cassandra,adelapena/cassandra,bcoverston/cassandra,Jollyplum/cassandra,yonglehou/cassandra,exoscale/cassandra,vramaswamy456/cassandra,beobal/cassandra,qinjin/mdtc-cassandra,sivikt/cassandra,cooldoger/cassandra,jeffjirsa/cassandra,boneill42/cassandra,sayanh/ViewMaintenanceCassandra,tongjixianing/projects,ptuckey/cassandra,pauloricardomg/cassandra,beobal/cassandra,mt0803/cassandra,shookari/cassandra,mt0803/cassandra,adelapena/cassandra,HidemotoNakada/cassandra-udf,guanxi55nba/key-value-store,RyanMagnusson/cassandra,Bj0rnen/cassandra,vaibhi9/cassandra,mshuler/cassandra,qinjin/mdtc-cassandra,pbailis/cassandra-pbs,josh-mckenzie/cassandra,stuhood/cassandra-old,likaiwalkman/cassandra,yukim/cassandra,newrelic-forks/cassandra,sammyyu/Cassandra,kangkot/stratio-cassandra,ben-manes/cassandra,strapdata/cassandra,sharvanath/cassandra,spodkowinski/cassandra,guard163/cassandra,project-zerus/cassandra,Bj0rnen/cassandra,driftx/cassandra,macintoshio/cassandra,WorksApplications/cassandra,mariusae/cassandra,cooldoger/cassandra,a-buck/cassandra,sivikt/cassandra,DikangGu/cassandra,iburmistrov/Cassandra,yhnishi/cassandra,mambocab/cassandra,carlyeks/cassandra,pcmanus/cassandra,weipinghe/cassandra,krummas/cassandra,chbatey/cassandra-1,knifewine/cassandra,JeremiahDJordan/cassandra,jasobrown/cassandra,kangkot/stratio-cassandra,b/project-cassandra,scylladb/scylla-tools-java,EnigmaCurry/cassandra,driftx/cassandra,ollie314/cassandra,aarushi12002/cassandra,aarushi12002/cassandra,jasonstack/cassandra,pofallon/cassandra,segfault/apache_cassandra,mshuler/cassandra,nlalevee/cassandra,RyanMagnusson/cassandra,dkua/cassandra,gdusbabek/cassandra,dongjiaqiang/cassandra,jrwest/cassandra,lalithsuresh/cassandra-c3,jasonwee/cassandra,darach/cassandra,yangzhe1991/cassandra,jkni/cassandra,jasobrown/cassandra,ifesdjeen/cassandra,modempachev4/kassandra,thelastpickle/cassandra,Instagram/cassandra,juiceblender/cassandra,iburmistrov/Cassandra,jeromatron/cassandra,DavidHerzogTU-Berlin/cassandraToRun,pauloricardomg/cassandra,bpupadhyaya/cassandra,jbellis/cassandra,ibmsoe/cassandra,asias/cassandra,nitsanw/cassandra,bpupadhyaya/cassandra,wreda/cassandra,joesiewert/cassandra,thelastpickle/cassandra,ptuckey/cassandra,jasobrown/cassandra,stuhood/cassandra-old,sedulam/CASSANDRA-12201,rogerchina/cassandra,ptnapoleon/cassandra,xiongzheng/Cassandra-Research,regispl/cassandra,hengxin/cassandra,kgreav/cassandra,pofallon/cassandra,sivikt/cassandra,mheffner/cassandra-1,nakomis/cassandra,belliottsmith/cassandra,sriki77/cassandra,tjake/cassandra,strapdata/cassandra,mgmuscari/cassandra-cdh4,dprguiuc/Cassandra-Wasef,clohfink/cassandra,sbtourist/cassandra,nitsanw/cassandra,sayanh/ViewMaintenanceCassandra,joesiewert/cassandra,rmarchei/cassandra,b/project-cassandra,sayanh/ViewMaintenanceCassandra,bdeggleston/cassandra,instaclustr/cassandra,tommystendahl/cassandra,pcmanus/cassandra,mariusae/cassandra,aweisberg/cassandra,taigetco/cassandra_read,sharvanath/cassandra,Stratio/stratio-cassandra,michaelsembwever/cassandra,shookari/cassandra,Stratio/cassandra,Imran-C/cassandra,bpupadhyaya/cassandra,gdusbabek/cassandra,mambocab/cassandra,hhorii/cassandra,jsanda/cassandra,Instagram/cassandra,hengxin/cassandra,apache/cassandra,iamaleksey/cassandra,kangkot/stratio-cassandra,rmarchei/cassandra,jrwest/cassandra,regispl/cassandra,swps/cassandra,rackerlabs/cloudmetrics-cassandra,bcoverston/apache-hosted-cassandra,ibmsoe/cassandra,fengshao0907/cassandra-1,tommystendahl/cassandra,ejankan/cassandra,joesiewert/cassandra,nvoron23/cassandra,pallavi510/cassandra,jasonstack/cassandra,tjake/cassandra,Stratio/cassandra,yanbit/cassandra,stef1927/cassandra,AtwooTM/cassandra,tommystendahl/cassandra,emolsson/cassandra,jbellis/cassandra,driftx/cassandra,adelapena/cassandra,ptnapoleon/cassandra,mshuler/cassandra,thobbs/cassandra,szhou1234/cassandra,mike-tr-adamson/cassandra,mkjellman/cassandra,WorksApplications/cassandra,adejanovski/cassandra,codefollower/Cassandra-Research,pofallon/cassandra,sbtourist/cassandra,aboudreault/cassandra,jasonwee/cassandra,stuhood/cassandra-old,fengshao0907/cassandra-1,miguel0afd/cassandra-cqlMod,ejankan/cassandra,DavidHerzogTU-Berlin/cassandra,krummas/cassandra,mgmuscari/cassandra-cdh4,ollie314/cassandra,adejanovski/cassandra,rdio/cassandra,apache/cassandra,shawnkumar/cstargraph,EnigmaCurry/cassandra,bdeggleston/cassandra,aboudreault/cassandra,aboudreault/cassandra,HidemotoNakada/cassandra-udf,clohfink/cassandra,darach/cassandra,jsanda/cassandra,AtwooTM/cassandra,DikangGu/cassandra,blambov/cassandra,vaibhi9/cassandra,whitepages/cassandra,ptnapoleon/cassandra,sedulam/CASSANDRA-12201,newrelic-forks/cassandra,weipinghe/cassandra,DICL/cassandra,segfault/apache_cassandra,dkua/cassandra,vaibhi9/cassandra,nitsanw/cassandra,blambov/cassandra,chbatey/cassandra-1,fengshao0907/cassandra-1,iamaleksey/cassandra,spodkowinski/cassandra,hhorii/cassandra,modempachev4/kassandra,leomrocha/cassandra,guanxi55nba/db-improvement,stef1927/cassandra,lalithsuresh/cassandra-c3,pauloricardomg/cassandra,leomrocha/cassandra,caidongyun/cassandra,rogerchina/cassandra,taigetco/cassandra_read,heiko-braun/cassandra,mashuai/Cassandra-Research,christian-esken/cassandra,jrwest/cassandra,bcoverston/cassandra,bdeggleston/cassandra,GabrielNicolasAvellaneda/cassandra,emolsson/cassandra,spodkowinski/cassandra,exoscale/cassandra,bmel/cassandra,Stratio/stratio-cassandra,Bj0rnen/cassandra,pcmanus/cassandra,apache/cassandra,weideng1/cassandra,sedulam/CASSANDRA-12201,juiceblender/cassandra,phact/cassandra,ben-manes/cassandra,sbtourist/cassandra,guanxi55nba/key-value-store,tjake/cassandra,szhou1234/cassandra,aureagle/cassandra,WorksApplications/cassandra,GabrielNicolasAvellaneda/cassandra,pbailis/cassandra-pbs,bmel/cassandra,snazy/cassandra,pkdevbox/cassandra,taigetco/cassandra_read,belliottsmith/cassandra,szhou1234/cassandra,nvoron23/cassandra,matthewtt/cassandra_read,LatencyUtils/cassandra-stress2,exoscale/cassandra,kangkot/stratio-cassandra,JeremiahDJordan/cassandra,pkdevbox/cassandra,mambocab/cassandra,likaiwalkman/cassandra,iburmistrov/Cassandra,DavidHerzogTU-Berlin/cassandraToRun,b/project-cassandra,weideng1/cassandra,MasahikoSawada/cassandra,josh-mckenzie/cassandra,Imran-C/cassandra,blerer/cassandra,sriki77/cassandra,guanxi55nba/db-improvement,szhou1234/cassandra,emolsson/cassandra,jeromatron/cassandra,kangkot/stratio-cassandra,macintoshio/cassandra,ollie314/cassandra,JeremiahDJordan/cassandra,juiceblender/cassandra,vramaswamy456/cassandra,rdio/cassandra,dongjiaqiang/cassandra,sammyyu/Cassandra,thelastpickle/cassandra,ifesdjeen/cassandra,blerer/cassandra,adejanovski/cassandra,scaledata/cassandra,Stratio/stratio-cassandra,snazy/cassandra,knifewine/cassandra,knifewine/cassandra,snazy/cassandra,juiceblender/cassandra,aweisberg/cassandra,MasahikoSawada/cassandra,scylladb/scylla-tools-java,pallavi510/cassandra,xiongzheng/Cassandra-Research,DICL/cassandra,Jaumo/cassandra,beobal/cassandra,whitepages/cassandra,stef1927/cassandra,helena/cassandra,HidemotoNakada/cassandra-udf,sluk3r/cassandra,tongjixianing/projects,swps/cassandra,jkni/cassandra,beobal/cassandra,leomrocha/cassandra,yangzhe1991/cassandra,jasobrown/cassandra,guanxi55nba/key-value-store,heiko-braun/cassandra,helena/cassandra,weideng1/cassandra,jkni/cassandra,josh-mckenzie/cassandra,AtwooTM/cassandra,matthewtt/cassandra_read,bdeggleston/cassandra,iamaleksey/cassandra,ptuckey/cassandra,boneill42/cassandra,pallavi510/cassandra,wreda/cassandra,dprguiuc/Cassandra-Wasef,dkua/cassandra,chaordic/cassandra,shookari/cassandra,jeffjirsa/cassandra,jeffjirsa/cassandra,michaelsembwever/cassandra,EnigmaCurry/cassandra,nutbunnies/cassandra,bcoverston/apache-hosted-cassandra,michaelsembwever/cassandra,ben-manes/cassandra,thelastpickle/cassandra,ifesdjeen/cassandra,Instagram/cassandra,carlyeks/cassandra,nutbunnies/cassandra,sharvanath/cassandra,mike-tr-adamson/cassandra,MasahikoSawada/cassandra,dongjiaqiang/cassandra,mkjellman/cassandra,ifesdjeen/cassandra,pbailis/cassandra-pbs,mashuai/Cassandra-Research,DavidHerzogTU-Berlin/cassandra,yukim/cassandra,sayanh/ViewMaintenanceSupport,jbellis/cassandra,mgmuscari/cassandra-cdh4,Jaumo/cassandra,jeromatron/cassandra,b/project-cassandra,newrelic-forks/cassandra,weipinghe/cassandra,stef1927/cassandra,rmarchei/cassandra,phact/cassandra,rdio/cassandra,yangzhe1991/cassandra,sluk3r/cassandra,Stratio/stratio-cassandra,darach/cassandra