Skip to content

Support deletion of complete rows #46

@mmois

Description

@mmois

Is there a strong reason for not being able to delete a complete row?

Currently the method HaeinsaTable.delete() checks that the size of the family map is not zero and throws an exception if that is the case. The comment above the precondition check states that it is not possible to delete entire rows because of the lock column.

But shouldn't it be possible to remove the complete row in the HaeinsaTable.makeStable() method? Instead of setting the lock state for this row to STABLE, the row is removed from HBase.

In case the row is a secondary row in the transaction, the primary row needs the information that this row needs to be deleted. During transaction recovery (in the state COMMITTED) it can check whether the row has been deleted or not. It can delete the row if the prewriteTimestamp matches (in order to not delete a concurrently added new version).

In case the row is the primary row in the transaction, it can be removed completely.

If there are two competing transactions, one trying to delete and the other trying to update the row, then the updating one would fail (if the other one was faster) because the checkAndPut() operation fails when the row no longer exists. For the other way round HBase's checkAndDelete() operation can be used.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions