[
https://issues.apache.org/jira/browse/HBASE-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747618#action_12747618
]
Jean-Daniel Cryans commented on HBASE-1792:
-------------------------------------------
Just so I don't forget it, the timestamp is replaced silently here in
HRegion.updateKeys:
{code}
/**
* Checks if any stamps are > now. If so, sets them to now.
* <p>
* This acts to be prevent users from inserting future stamps as well as
* to replace LATEST_TIMESTAMP with now.
* @param keys
* @param now
* @return <code>true</code> when updating the time stamp completed.
*/
private boolean updateKeys(List<KeyValue> keys, byte [] now) {
if(keys == null || keys.isEmpty()) {
return false;
}
for(KeyValue key : keys) {
key.updateLatestStamp(now);
}
return true;
}
{code}
> [Regression] Cannot save timestamp in the future
> ------------------------------------------------
>
> Key: HBASE-1792
> URL: https://issues.apache.org/jira/browse/HBASE-1792
> Project: Hadoop HBase
> Issue Type: Bug
> Affects Versions: 0.20.0
> Reporter: Jean-Daniel Cryans
>
> 0.20, compared to previous versions, doesn't let you save with a timestamp in
> the future and will set it to current time without telling you. This is
> really bad for users upgrading to 0.20 that were using those timestamps.
> Example:
> hbase(main):004:0> put 'testtable', 'r1', 'f1:c1', 'val', 5373965335336911168
> 0 row(s) in 0.0070 seconds
> hbase(main):005:0> scan 'testtable'
> ROW COLUMN+CELL
>
> r1 column=f1:c1, timestamp=1251223892010,
> value=val
> 1 row(s) in 0.0380 seconds
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.