put with timestamp after delete is not stored
---------------------------------------------

                 Key: HBASE-2272
                 URL: https://issues.apache.org/jira/browse/HBASE-2272
             Project: Hadoop HBase
          Issue Type: Bug
    Affects Versions: 0.20.3
            Reporter: Matthias Lehmann


When I delete a row and afterwards put a value for that row again, I can not 
get it (so apparently it was not stored), but only, when I put the value with a 
timestamp.
A flush of the table between delete and put bypasses the problem.

I give a hbase-shell log as an example.
Lets assume, we have a table 'foo' with a column-familiy 's:':

The Error

>put 'foo', '123', 's:bar', 'hello'
>get 'foo', '123'
COLUMN                       CELL
 s:bar                       timestamp=..., value=hello
>deleteall 'foo', '123'
// put WITH timestamp
>put 'foo', '123', 's:bar', 'hello', 1267202287
> get 'foo', '123'
COLUMN                       CELL
// nothing, even though a value was saved before

But This Works

>put 'foo', '123', 's:bar', 'hello'
>get 'foo', '123'
COLUMN                       CELL
 s:bar                       timestamp=..., value=hello
>deleteall 'foo', '123'
// put WITHOUT timestamp
>put 'foo', '123', 's:bar', 'hello'
> get 'foo', '123'
COLUMN                       CELL
 s:bar                       timestamp=..., value=hello
// value was saved

And Also

>put 'foo', '123', 's:bar', 'hello'
>get 'foo', '123'
COLUMN                       CELL
 s:bar                       timestamp=..., value=hello
>deleteall 'foo', '123'
// flush table
>flush 'foo'
// put WITH timestamp
>put 'foo', '123', 's:bar', 'hello', 1267202287
> get 'foo', '123'
COLUMN                       CELL
 s:bar                       timestamp=..., value=hello
// value was saved

The error also occurs with single cells - one does not have to delete whole 
rows:

>put 'foo', '123', 's:bar', 'hello'
>put 'foo', '123', 's:baz', 'world'
>get 'foo', '123'
COLUMN                       CELL
 s:bar                       timestamp=..., value=hello
 s:baz                       timestamp=..., value=world
>delete 'foo', '123', 's:bar'
// put WITH timestamp
>put 'foo', '123', 's:bar', 'hello', 1267202287
>get 'foo', '123'
COLUMN                       CELL
 s:baz                       timestamp=..., value=world
// value for s:baz was not saved


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to