Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 57579 invoked from network); 30 Dec 2010 17:03:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Dec 2010 17:03:07 -0000 Received: (qmail 30185 invoked by uid 500); 30 Dec 2010 17:03:05 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 30129 invoked by uid 500); 30 Dec 2010 17:03:04 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 30113 invoked by uid 99); 30 Dec 2010 17:03:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Dec 2010 17:03:04 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dooley@apple.com designates 17.254.13.22 as permitted sender) Received: from [17.254.13.22] (HELO mail-out3.apple.com) (17.254.13.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Dec 2010 17:02:56 +0000 Received: from relay14.apple.com (relay14.apple.com [17.128.113.52]) by mail-out3.apple.com (Postfix) with ESMTP id 61C0FC359AD0 for ; Thu, 30 Dec 2010 09:02:36 -0800 (PST) X-AuditID: 11807134-b7cfdae000001831-e4-4d1cbb2b9f35 Received: from [17.153.52.60] (Unknown_Domain [17.153.52.60]) (using TLS with cipher AES128-SHA (AES128-SHA/128 bits)) (Client did not present a certificate) by relay14.apple.com (Apple SCV relay) with SMTP id C7.68.06193.B2BBC1D4; Thu, 30 Dec 2010 09:02:36 -0800 (PST) From: mike dooley Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/alternative; boundary=Apple-Mail-76--258741123 Subject: Re: can't re-insert row after deleting it? Date: Thu, 30 Dec 2010 09:02:34 -0800 In-Reply-To: To: user@cassandra.apache.org References: <81485CA5-0B5A-4D74-9556-7A64C10EF7BB@apple.com> Message-Id: <45392C0F-3494-4EE7-9E94-A72335BE1DF7@apple.com> X-Mailer: Apple Mail (2.1082) X-Brightmail-Tracker: AAAAAA== --Apple-Mail-76--258741123 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii hmm, i added a sleep(1000) between each operation and still see the same = behavior. but stranger still, if i do the exact same operations via the command = line they work as expected. and the logs for the two runs look identical to me (aside = from the different keys) -mike ----------------------------------- [default@unknown] use Harvest; Authenticated to keyspace: Harvest [default@Harvest]=20 [default@Harvest] set Test1['row-c1']['dummy-col'] =3D 'value-a'; Value inserted. [default@Harvest] get Test1['row-c1']['dummy-col']; =3D> (column=3Ddummy-col, value=3D76616c75652d61, = timestamp=3D1293727499867000) [default@Harvest]=20 [default@Harvest] del Test1['row-c1']; row removed. [default@Harvest] get Test1['row-c1']['dummy-col']; Value was not found [default@Harvest]=20 [default@Harvest] set Test1['row-c1']['dummy-col'] =3D 'value-a'; Value inserted. [default@Harvest] get Test1['row-c1']['dummy-col']; =3D> (column=3Ddummy-col, value=3D76616c75652d61, = timestamp=3D1293727499912000) DEBUG 08:44:59,872 insert DEBUG 08:44:59,876 insert writing local RowMutation(keyspace=3D'Harvest', = key=3D'726f772d6331', modifications=3D[Test1]) DEBUG 08:44:59,882 applying mutation of row 726f772d6331 DEBUG 08:44:59,892 get DEBUG 08:44:59,893 Sorted endpoints are localhost/127.0.0.1 DEBUG 08:44:59,893 weakread reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6331, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) = locally DEBUG 08:44:59,894 weakreadlocal reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6331, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) DEBUG 08:44:59,903 remove DEBUG 08:44:59,903 insert writing local RowMutation(keyspace=3D'Harvest', = key=3D'726f772d6331', modifications=3D[Test1]) DEBUG 08:44:59,904 applying mutation of row 726f772d6331 DEBUG 08:44:59,908 get DEBUG 08:44:59,908 Sorted endpoints are localhost/127.0.0.1 DEBUG 08:44:59,909 weakread reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6331, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) = locally DEBUG 08:44:59,909 weakreadlocal reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6331, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) DEBUG 08:44:59,912 insert DEBUG 08:44:59,913 insert writing local RowMutation(keyspace=3D'Harvest', = key=3D'726f772d6331', modifications=3D[Test1]) DEBUG 08:44:59,913 applying mutation of row 726f772d6331 DEBUG 08:44:59,919 get DEBUG 08:44:59,919 Sorted endpoints are localhost/127.0.0.1 DEBUG 08:44:59,919 weakread reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6331, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) = locally DEBUG 08:44:59,920 weakreadlocal reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6331, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) ------------------ =3D=3D=3D starting =3D=3D=3D inserting row: row-j1, value: value-a =3D=3D=3D about to retrieve data =3D=3D=3D got (dummy-col,value-a) =3D=3D=3D deleting row: row-j1 =3D=3D=3D data not found, as expected =3D=3D=3D re-inserting row: row-j1 =3D=3D=3D !!!! re-inserted data not found =3D=3D=3D crush all boxes DEBUG 08:46:20,131 insert DEBUG 08:46:20,132 insert writing local RowMutation(keyspace=3D'Harvest', = key=3D'726f772d6a31', modifications=3D[Test1]) DEBUG 08:46:20,133 applying mutation of row 726f772d6a31 DEBUG 08:46:20,144 get DEBUG 08:46:20,144 Sorted endpoints are localhost/127.0.0.1 DEBUG 08:46:20,145 weakread reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6a31, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) = locally DEBUG 08:46:20,145 weakreadlocal reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6a31, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) DEBUG 08:46:21,156 remove DEBUG 08:46:21,157 insert writing local RowMutation(keyspace=3D'Harvest', = key=3D'726f772d6a31', modifications=3D[Test1]) DEBUG 08:46:21,157 applying mutation of row 726f772d6a31 DEBUG 08:46:21,160 get DEBUG 08:46:21,161 Sorted endpoints are localhost/127.0.0.1 DEBUG 08:46:21,161 weakread reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6a31, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) = locally DEBUG 08:46:21,161 weakreadlocal reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6a31, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) DEBUG 08:46:22,164 insert DEBUG 08:46:22,167 insert writing local RowMutation(keyspace=3D'Harvest', = key=3D'726f772d6a31', modifications=3D[Test1]) DEBUG 08:46:22,167 applying mutation of row 726f772d6a31 DEBUG 08:46:22,168 get DEBUG 08:46:22,169 Sorted endpoints are localhost/127.0.0.1 DEBUG 08:46:22,169 weakread reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6a31, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) = locally DEBUG 08:46:22,169 weakreadlocal reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6a31, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) On Dec 29, 2010, at 8:27 PM, Jonathan Ellis wrote: > deletes "win" races, so if 3) happens at the same timestamp as 2) then > the delete takes precedence. >=20 > On Wed, Dec 29, 2010 at 9:58 PM, mike dooley wrote: >> sorry, i forgot to mention that i am using 0.7-rc2 >>=20 >> On Dec 29, 2010, at 7:56 PM, mike dooley wrote: >>=20 >>> things have not been going very well for me today, so maybe there's = something >>> that i'm missing, but here is a little test program that just: >>>=20 >>> 1) inserts a single column in a row, >>> 2) deletes the row, >>> 3) re-inserts the row >>>=20 >>> but it seems that the second insert fails to actually insert the = data. here is the output >>> of the test program >>>=20 >>> =3D=3D=3D starting >>> =3D=3D=3D inserting row: row-a, value: value-a >>> =3D=3D=3D about to retrieve data >>> =3D=3D=3D got (dummy-col,value-a) >>> =3D=3D=3D deleting row: row-a >>> =3D=3D=3D data not found, as expected >>> =3D=3D=3D re-inserting row: row-a >>> =3D=3D=3D !!!! re-inserted data not found >>> =3D=3D=3D crush all boxes >>>=20 >>> and subsequent inserts also fail (if you run the program again). >>>=20 >>> here is the test program >>>=20 >>> >>>=20 >>> i am just using a single node, with the following schema >>>=20 >>> create keyspace Harvest with replication_factor =3D 1 and = placement_strategy =3D 'org.apache.cassandra.locator.SimpleStrategy'; >>> use Harvest; >>> create column family Test1 with column_type =3D 'Standard' and = comparator =3D 'UTF8Type'; >>>=20 >>> thanks in advance. >>> -mike >>=20 >>=20 >=20 >=20 >=20 > --=20 > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of Riptano, the source for professional Cassandra support > http://riptano.com --Apple-Mail-76--258741123 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii hmm, = i added a sleep(1000) between each operation and still see the same = behavior.
but stranger still, if i do the exact same operations via = the command line they work
as expected.  and the logs for = the two runs look identical to me (aside from the different = keys)

-mike


-----------------------------------

[defa= ult@unknown] use Harvest;
Authenticated to keyspace: = Harvest
[default@Harvest] 
[default@Harvest] = set Test1['row-c1']['dummy-col'] =3D 'value-a';
Value = inserted.
[default@Harvest] get = Test1['row-c1']['dummy-col'];
=3D> (column=3Ddummy-col, = value=3D76616c75652d61, = timestamp=3D1293727499867000)
[default@Harvest] 
= [default@Harvest] del Test1['row-c1'];
row = removed.
[default@Harvest] get = Test1['row-c1']['dummy-col'];
Value was not = found
[default@Harvest] 
[default@Harvest] set = Test1['row-c1']['dummy-col'] =3D 'value-a';
Value = inserted.
[default@Harvest] get = Test1['row-c1']['dummy-col'];
=3D> (column=3Ddummy-col, = value=3D76616c75652d61, = timestamp=3D1293727499912000)

DEBUG = 08:44:59,872 insert
DEBUG 08:44:59,876 insert writing local = RowMutation(keyspace=3D'Harvest', key=3D'726f772d6331', = modifications=3D[Test1])
DEBUG 08:44:59,882 applying mutation = of row 726f772d6331
DEBUG 08:44:59,892 get
DEBUG = 08:44:59,893 Sorted endpoints are localhost/127.0.0.1
DEBUG = 08:44:59,893 weakread reading SliceByNamesReadCommand(table=3D'Harvest', = key=3D726f772d6331, columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) = locally
DEBUG 08:44:59,894 weakreadlocal reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6331, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', = columns=3D[dummy-col,])
DEBUG 08:44:59,903 = remove
DEBUG 08:44:59,903 insert writing local = RowMutation(keyspace=3D'Harvest', key=3D'726f772d6331', = modifications=3D[Test1])
DEBUG 08:44:59,904 applying mutation = of row 726f772d6331
DEBUG 08:44:59,908 get
DEBUG = 08:44:59,908 Sorted endpoints are localhost/127.0.0.1
DEBUG = 08:44:59,909 weakread reading SliceByNamesReadCommand(table=3D'Harvest', = key=3D726f772d6331, columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) = locally
DEBUG 08:44:59,909 weakreadlocal reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6331, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', = columns=3D[dummy-col,])
DEBUG 08:44:59,912 = insert
DEBUG 08:44:59,913 insert writing local = RowMutation(keyspace=3D'Harvest', key=3D'726f772d6331', = modifications=3D[Test1])
DEBUG 08:44:59,913 applying mutation = of row 726f772d6331
DEBUG 08:44:59,919 get
DEBUG = 08:44:59,919 Sorted endpoints are localhost/127.0.0.1
DEBUG = 08:44:59,919 weakread reading SliceByNamesReadCommand(table=3D'Harvest', = key=3D726f772d6331, columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) = locally
DEBUG 08:44:59,920 weakreadlocal reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6331, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', = columns=3D[dummy-col,])

------------------
<= div>
=3D=3D=3D starting
=3D=3D=3D inserting row: = row-j1, value: value-a
=3D=3D=3D about to retrieve = data
=3D=3D=3D got (dummy-col,value-a)
=3D=3D=3D = deleting row: row-j1
=3D=3D=3D data not found, as = expected
=3D=3D=3D re-inserting row: row-j1
=3D=3D=3D = !!!! re-inserted data not found
=3D=3D=3D crush all = boxes

DEBUG 08:46:20,131 insert
DEBUG = 08:46:20,132 insert writing local RowMutation(keyspace=3D'Harvest', = key=3D'726f772d6a31', modifications=3D[Test1])
DEBUG = 08:46:20,133 applying mutation of row 726f772d6a31
DEBUG = 08:46:20,144 get
DEBUG 08:46:20,144 Sorted endpoints are = localhost/127.0.0.1
DEBUG 08:46:20,145 weakread reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6a31, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) = locally
DEBUG 08:46:20,145 weakreadlocal reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6a31, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', = columns=3D[dummy-col,])
DEBUG 08:46:21,156 = remove
DEBUG 08:46:21,157 insert writing local = RowMutation(keyspace=3D'Harvest', key=3D'726f772d6a31', = modifications=3D[Test1])
DEBUG 08:46:21,157 applying mutation = of row 726f772d6a31
DEBUG 08:46:21,160 get
DEBUG = 08:46:21,161 Sorted endpoints are localhost/127.0.0.1
DEBUG = 08:46:21,161 weakread reading SliceByNamesReadCommand(table=3D'Harvest', = key=3D726f772d6a31, columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) = locally
DEBUG 08:46:21,161 weakreadlocal reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6a31, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', = columns=3D[dummy-col,])
DEBUG 08:46:22,164 = insert
DEBUG 08:46:22,167 insert writing local = RowMutation(keyspace=3D'Harvest', key=3D'726f772d6a31', = modifications=3D[Test1])
DEBUG 08:46:22,167 applying mutation = of row 726f772d6a31
DEBUG 08:46:22,168 get
DEBUG = 08:46:22,169 Sorted endpoints are localhost/127.0.0.1
DEBUG = 08:46:22,169 weakread reading SliceByNamesReadCommand(table=3D'Harvest', = key=3D726f772d6a31, columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', columns=3D[dummy-col,]) = locally
DEBUG 08:46:22,169 weakreadlocal reading = SliceByNamesReadCommand(table=3D'Harvest', key=3D726f772d6a31, = columnParent=3D'QueryPath(columnFamilyName=3D'Test1', = superColumnName=3D'null', columnName=3D'null')', = columns=3D[dummy-col,])


On Dec 29, 2010, at 8:27 PM, Jonathan Ellis wrote:

deletes= "win" races, so if 3) happens at the same timestamp as 2) then
the = delete takes precedence.

On Wed, Dec 29, 2010 at 9:58 PM, mike = dooley <dooley@apple.com> = wrote:
sorry, i forgot to mention that i am = using 0.7-rc2

On Dec 29, = 2010, at 7:56 PM, mike dooley wrote:

things have not been going very well for me today, so = maybe there's something
that i'm missing, but here is a = little test program that just:

1) inserts a single column in a = row,
2) deletes the = row,
3) re-inserts the = row

but it seems that the second = insert fails to actually insert the data. here is the = output
of the test = program

=3D=3D=3D = starting
=3D=3D=3D inserting row: row-a, = value: value-a
=3D=3D=3D about to retrieve = data
=3D=3D=3D got = (dummy-col,value-a)
=3D=3D=3D deleting row: = row-a
=3D=3D=3D data not found, as = expected
=3D=3D=3D re-inserting row: = row-a
=3D=3D=3D !!!! re-inserted data not = found
=3D=3D=3D crush all = boxes

and subsequent inserts also fail = (if you run the program again).

here is the test = program

<CClient.java>

i am just using a single node, = with the following schema

 create keyspace Harvest = with replication_factor =3D 1 and placement_strategy =3D = 'org.apache.cassandra.locator.SimpleStrategy';
 use = Harvest;
 create column family Test1 = with column_type =3D 'Standard' and comparator =3D = 'UTF8Type';

thanks in = advance.
-mike





--
Jonathan = Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the = source for professional Cassandra support
http://riptano.com
<= /div>
= --Apple-Mail-76--258741123--