Ticket #198 (closed task: fixed)
Repository.create() on already existing record does not throw RecordExistsException
| Reported by: | bruno | Owned by: | evert |
|---|---|---|---|
| Priority: | major | Milestone: | 0.3 |
| Component: | Repository | Version: | |
| Keywords: | Cc: |
Description
Seems like RecordExistsException? is never thrown.
Change History
Note: See
TracTickets for help on using
tickets.
While looking at this, we should also do the following: in HBaseRepository.create(), we use HBase lockRow to lock the row because of the reasoning "the row does not exist yet", so we cannot use our custom RowLocker? that locks by writing a KV. However, Repository.update/delete also lock the row using RowLocker? without knowing the row exist. And this does not cause any harm, since the existence of a row does not depend on the presence of this KV pair (but rather on deleted=false). Hence, we can as well remove the use of HBase lockRow in Repository.create(), removing our only use of HBase row locks, and as such bringing more homogeneity in our lock patterns.