You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Ananth Gundabattula (JIRA)" <ji...@apache.org> on 2012/10/06 07:04:02 UTC
[jira] [Created] (CASSANDRA-4773) CQL shell not reflecting latest
data when timestamp is passed as part of insert statements
Ananth Gundabattula created CASSANDRA-4773:
----------------------------------------------
Summary: CQL shell not reflecting latest data when timestamp is passed as part of insert statements
Key: CASSANDRA-4773
URL: https://issues.apache.org/jira/browse/CASSANDRA-4773
Project: Cassandra
Issue Type: Bug
Affects Versions: 1.1.4
Environment: CentOS
Reporter: Ananth Gundabattula
Priority: Critical
While using the CQLSH, I try inserting a row using timestamp and TTL along with consistency. The insert works fine for the first time. When I try to insert using the same key but different value and then issue a select , the value of the returned row is always the first value of the inserted row and not the value that was inserted later. Here are the details :
1. Replication Factor = 1
2. Consistency Level = ONE
3. TTL = 14 days
4. Timestamp = A value which reflects 10 days before the current day
5. Cassandra 1.1.4
6. CQL shell version 2
It may be noted that if the timstamp is not used while issuing the insert statement, the second insert on the same key works fine.
Here are the details:
1. INSERT INTO Table1 (col1,col2,col3,col4,col5,col6) VALUES('abcde', 0, 87, 1345603159,222,'65DE') USING TIMESTAMP 1349476620 AND TTL 1209600;
This works fine
2. Issuing a select works fine for the above row.
3. INSERT INTO Table1 (col1,col2,col3,col4,col5,col6) VALUES('abcde', 0, 87, 1345603159,222,'a2134') USING TIMESTAMP 1349476620 AND TTL 1209600;
There is no error on this statement
4. Issuing a select returns the data inserted as given in step 1.
5. Giving a timestamp later than the above timestamp also does not change things
6. However, if I issue an insert without specifying the timestamp , the select statement gives the latest data always.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CASSANDRA-4773) CQL shell not reflecting latest
data when timestamp is passed as part of insert statements
Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brandon Williams resolved CASSANDRA-4773.
-----------------------------------------
Resolution: Not A Problem
Timestamps are the method of conflict resolution, so when you use the same one the behavior is undefined but deterministic.
> CQL shell not reflecting latest data when timestamp is passed as part of insert statements
> ------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-4773
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4773
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.1.4
> Environment: CentOS
> Reporter: Ananth Gundabattula
> Priority: Critical
>
> While using the CQLSH, I try inserting a row using timestamp and TTL along with consistency. The insert works fine for the first time. When I try to insert using the same key but different value and then issue a select , the value of the returned row is always the first value of the inserted row and not the value that was inserted later. Here are the details :
> 1. Replication Factor = 1
> 2. Consistency Level = ONE
> 3. TTL = 14 days
> 4. Timestamp = A value which reflects 10 days before the current day
> 5. Cassandra 1.1.4
> 6. CQL shell version 2
> It may be noted that if the timstamp is not used while issuing the insert statement, the second insert on the same key works fine.
> Here are the details:
> 1. INSERT INTO Table1 (col1,col2,col3,col4,col5,col6) VALUES('abcde', 0, 87, 1345603159,222,'65DE') USING TIMESTAMP 1349476620 AND TTL 1209600;
> This works fine
> 2. Issuing a select works fine for the above row.
> 3. INSERT INTO Table1 (col1,col2,col3,col4,col5,col6) VALUES('abcde', 0, 87, 1345603159,222,'a2134') USING TIMESTAMP 1349476620 AND TTL 1209600;
> There is no error on this statement
> 4. Issuing a select returns the data inserted as given in step 1.
> 5. Giving a timestamp later than the above timestamp also does not change things
> 6. However, if I issue an insert without specifying the timestamp , the select statement gives the latest data always.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4773) CQL shell not reflecting latest
data when timestamp is passed as part of insert statements
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471135#comment-13471135 ]
Jonathan Ellis commented on CASSANDRA-4773:
-------------------------------------------
It looks like you're using timestamp-in-millis. The standard for C* clients in general, and what C* will provide in the absence of an explicit one, is micros (so 1000x larger).
> CQL shell not reflecting latest data when timestamp is passed as part of insert statements
> ------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-4773
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4773
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.1.4
> Environment: CentOS
> Reporter: Ananth Gundabattula
> Priority: Critical
>
> While using the CQLSH, I try inserting a row using timestamp and TTL along with consistency. The insert works fine for the first time. When I try to insert using the same key but different value and then issue a select , the value of the returned row is always the first value of the inserted row and not the value that was inserted later. Here are the details :
> 1. Replication Factor = 1
> 2. Consistency Level = ONE
> 3. TTL = 14 days
> 4. Timestamp = A value which reflects 10 days before the current day
> 5. Cassandra 1.1.4
> 6. CQL shell version 2
> It may be noted that if the timstamp is not used while issuing the insert statement, the second insert on the same key works fine.
> Here are the details:
> 1. INSERT INTO Table1 (col1,col2,col3,col4,col5,col6) VALUES('abcde', 0, 87, 1345603159,222,'65DE') USING TIMESTAMP 1349476620 AND TTL 1209600;
> This works fine
> 2. Issuing a select works fine for the above row.
> 3. INSERT INTO Table1 (col1,col2,col3,col4,col5,col6) VALUES('abcde', 0, 87, 1345603159,222,'a2134') USING TIMESTAMP 1349476620 AND TTL 1209600;
> There is no error on this statement
> 4. Issuing a select returns the data inserted as given in step 1.
> 5. Giving a timestamp later than the above timestamp also does not change things
> 6. However, if I issue an insert without specifying the timestamp , the select statement gives the latest data always.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4773) CQL shell not reflecting latest
data when timestamp is passed as part of insert statements
Posted by "Ananth Gundabattula (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471095#comment-13471095 ]
Ananth Gundabattula commented on CASSANDRA-4773:
------------------------------------------------
Hello Brandon,
Thanks a lot for responding to the ticket. So if I get you correctly, event using a timestamp later than the first timestamp should result in an undefined behavior? I did try step 5 as given above wherein the second insert was with a timestamp much later than the first timestamp. In spite of this, I get the row inserted first but not with the later time stamp. As per my current understanding of cassandra that does not sound to be right. Maybe I am missing something here ?
> CQL shell not reflecting latest data when timestamp is passed as part of insert statements
> ------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-4773
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4773
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.1.4
> Environment: CentOS
> Reporter: Ananth Gundabattula
> Priority: Critical
>
> While using the CQLSH, I try inserting a row using timestamp and TTL along with consistency. The insert works fine for the first time. When I try to insert using the same key but different value and then issue a select , the value of the returned row is always the first value of the inserted row and not the value that was inserted later. Here are the details :
> 1. Replication Factor = 1
> 2. Consistency Level = ONE
> 3. TTL = 14 days
> 4. Timestamp = A value which reflects 10 days before the current day
> 5. Cassandra 1.1.4
> 6. CQL shell version 2
> It may be noted that if the timstamp is not used while issuing the insert statement, the second insert on the same key works fine.
> Here are the details:
> 1. INSERT INTO Table1 (col1,col2,col3,col4,col5,col6) VALUES('abcde', 0, 87, 1345603159,222,'65DE') USING TIMESTAMP 1349476620 AND TTL 1209600;
> This works fine
> 2. Issuing a select works fine for the above row.
> 3. INSERT INTO Table1 (col1,col2,col3,col4,col5,col6) VALUES('abcde', 0, 87, 1345603159,222,'a2134') USING TIMESTAMP 1349476620 AND TTL 1209600;
> There is no error on this statement
> 4. Issuing a select returns the data inserted as given in step 1.
> 5. Giving a timestamp later than the above timestamp also does not change things
> 6. However, if I issue an insert without specifying the timestamp , the select statement gives the latest data always.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4773) CQL shell not reflecting latest
data when timestamp is passed as part of insert statements
Posted by "Ananth Gundabattula (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471140#comment-13471140 ]
Ananth Gundabattula commented on CASSANDRA-4773:
------------------------------------------------
Thanks Jonathan. That was indeed the cause. Closing this issue.
> CQL shell not reflecting latest data when timestamp is passed as part of insert statements
> ------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-4773
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4773
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.1.4
> Environment: CentOS
> Reporter: Ananth Gundabattula
> Priority: Critical
>
> While using the CQLSH, I try inserting a row using timestamp and TTL along with consistency. The insert works fine for the first time. When I try to insert using the same key but different value and then issue a select , the value of the returned row is always the first value of the inserted row and not the value that was inserted later. Here are the details :
> 1. Replication Factor = 1
> 2. Consistency Level = ONE
> 3. TTL = 14 days
> 4. Timestamp = A value which reflects 10 days before the current day
> 5. Cassandra 1.1.4
> 6. CQL shell version 2
> It may be noted that if the timstamp is not used while issuing the insert statement, the second insert on the same key works fine.
> Here are the details:
> 1. INSERT INTO Table1 (col1,col2,col3,col4,col5,col6) VALUES('abcde', 0, 87, 1345603159,222,'65DE') USING TIMESTAMP 1349476620 AND TTL 1209600;
> This works fine
> 2. Issuing a select works fine for the above row.
> 3. INSERT INTO Table1 (col1,col2,col3,col4,col5,col6) VALUES('abcde', 0, 87, 1345603159,222,'a2134') USING TIMESTAMP 1349476620 AND TTL 1209600;
> There is no error on this statement
> 4. Issuing a select returns the data inserted as given in step 1.
> 5. Giving a timestamp later than the above timestamp also does not change things
> 6. However, if I issue an insert without specifying the timestamp , the select statement gives the latest data always.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (CASSANDRA-4773) CQL shell not reflecting latest
data when timestamp is passed as part of insert statements
Posted by "Ananth Gundabattula (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ananth Gundabattula closed CASSANDRA-4773.
------------------------------------------
Not a bug as the time format used was wrong
> CQL shell not reflecting latest data when timestamp is passed as part of insert statements
> ------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-4773
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4773
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.1.4
> Environment: CentOS
> Reporter: Ananth Gundabattula
> Priority: Critical
>
> While using the CQLSH, I try inserting a row using timestamp and TTL along with consistency. The insert works fine for the first time. When I try to insert using the same key but different value and then issue a select , the value of the returned row is always the first value of the inserted row and not the value that was inserted later. Here are the details :
> 1. Replication Factor = 1
> 2. Consistency Level = ONE
> 3. TTL = 14 days
> 4. Timestamp = A value which reflects 10 days before the current day
> 5. Cassandra 1.1.4
> 6. CQL shell version 2
> It may be noted that if the timstamp is not used while issuing the insert statement, the second insert on the same key works fine.
> Here are the details:
> 1. INSERT INTO Table1 (col1,col2,col3,col4,col5,col6) VALUES('abcde', 0, 87, 1345603159,222,'65DE') USING TIMESTAMP 1349476620 AND TTL 1209600;
> This works fine
> 2. Issuing a select works fine for the above row.
> 3. INSERT INTO Table1 (col1,col2,col3,col4,col5,col6) VALUES('abcde', 0, 87, 1345603159,222,'a2134') USING TIMESTAMP 1349476620 AND TTL 1209600;
> There is no error on this statement
> 4. Issuing a select returns the data inserted as given in step 1.
> 5. Giving a timestamp later than the above timestamp also does not change things
> 6. However, if I issue an insert without specifying the timestamp , the select statement gives the latest data always.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira