hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hangjun Ye (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8721) Deletes can mask puts that happen after the delete
Date Wed, 19 Jun 2013 07:29:28 GMT

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

Hangjun Ye commented on HBASE-8721:
-----------------------------------

For Sergey Shelukhin's example:

 But do you agree for this behavior for puts?
 If I put row1,cf:c,ts=5,foo; and before, someone put row1,cf:c,ts=10,bar, when I read I will
get "bar", not "foo".
 It's just the same with deletes.


Actually that's the major reason why I personally think the current behavior of delete is
confusing for users.
If I write a new value and want to make sure it appears (mask all previously written values
), I would firstly delete row1,cf:c,ts<=MAX_TIMESTAMP, and then put row1,cf:c,ts=5,foo.

It might happen when people load data into hbase table (maybe from another table and user
needs to keep original timestamps).
Possibly some old data have been already there and should be abandoned.
Instead of deleting the whole table (sometimes it's impossible), people might want to "clear"
a cell before writing to it.
Issuing a delete with ts<=MAX_TIMESTAMP might be a intuitive way to resort to.

But under current implementation, issuing such a delete (with ts<=MAX_TIMESTAMP) would
mask all future puts (until major compaction).

I think it would very nice if hbase could provide such a way to clear all old data of a cell
easily.
Sounds limiting the semantics of delete to only mask previous puts is a feasible approach.
                
> Deletes can mask puts that happen after the delete
> --------------------------------------------------
>
>                 Key: HBASE-8721
>                 URL: https://issues.apache.org/jira/browse/HBASE-8721
>             Project: HBase
>          Issue Type: Improvement
>          Components: regionserver
>            Reporter: Feng Honghua
>         Attachments: HBASE-8721-0.94-V0.patch
>
>
> this fix aims for bug mentioned in http://hbase.apache.org/book.html 5.8.2.1:
> "Deletes mask puts, even puts that happened after the delete was entered. Remember that
a delete writes a tombstone, which only disappears after then next major compaction has run.
Suppose you do a delete of everything <= T. After this you do a new put with a timestamp
<= T. This put, even if it happened after the delete, will be masked by the delete tombstone.
Performing the put will not fail, but when you do a get you will notice the put did have no
effect. It will start working again after the major compaction has run. These issues should
not be a problem if you use always-increasing versions for new puts to a row. But they can
occur even if you do not care about time: just do delete and put immediately after each other,
and there is some chance they happen within the same millisecond."

--
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

Mime
View raw message