You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "A B (JIRA)" <ji...@apache.org> on 2014/04/15 10:49:15 UTC

[jira] [Comment Edited] (THRIFT-2468) Timestamp handling

    [ https://issues.apache.org/jira/browse/THRIFT-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13969347#comment-13969347 ] 

A B edited comment on THRIFT-2468 at 4/15/14 8:48 AM:
------------------------------------------------------

My mistake, workaround is wrong.
When trying getRowTs with timestamp as string i get the current data, not the data with that timestamp.
It seems to work, but timestamp as string is interpreted as missing timestamp, so i get the last version.

Tried timestamp as number again.

Problem is: 
I write new data with thrift and a given timestamp.
When i try to read the inserted data with getRowTs in callback from mutateRowTS, I get an empty result.
If i use getRow (without timestamp), the currently inserted row is returned.
getRow finds new data, getRowTs NOT.
getRowTs gets only data if I read a row with older timestamp.

Is it a timing problem?

Code like this:
{quote}
client.mutateRowTs(table, key, mutateData, myTimestamp, null, callback);
{quote}
In callback:
{quote}
// Dont get last inserted row, result empty
client.getRowTs(table, key, myTimestamp, null, callbackResult);
// Get last inserted row, result filled
client.getRow(table, key, null, callbackResult);
{quote}


was (Author: gunny88):
My mistake, workaround is wrong.
When trying getRowTs with timestamp as string i get the current data, not the data with that timestamp.
It seems to work, but timestamp as string is interpreted as missing timestamp, so i get the last version.

Tried timestamp as number again.

Problem is: 
I write new data with thrift and a given timestamp.
When i try to read the inserted data with getRowTs in callback from mutateRowTS, I get an empty result.
If i use getRow (without timestamp), the currently inserted row is returned.
getRow finds new data, getRowTs NOT.

Is it a timing problem?

Code like this:
{quote}
client.mutateRow(table, key, mutateData, null, callback);
{quote}
In callback:
{quote}
// Dont get last inserted row, result empty
client.getRowTs(table, key, timestamp, null, callbackResult);
// Get last inserted row, result filled
client.getRow(table, key, null, callbackResult);
{quote}

> Timestamp handling
> ------------------
>
>                 Key: THRIFT-2468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2468
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.9.1
>         Environment: nodejs 
>            Reporter: A B
>              Labels: node.js, thrift
>
> When writing data i use a number for timestamp:
> mutateRowTs ("tab", "key", data, 1234567890 ..
> When reading data i must use a string for timestamp:
> getRowTs ("tab", "key", "1234567890" ...
> Triing to use a number results in an empty result.



--
This message was sent by Atlassian JIRA
(v6.2#6252)