[
https://issues.apache.org/jira/browse/PHOENIX-5768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17056513#comment-17056513
]
Geoffrey Jacoby edited comment on PHOENIX-5768 at 3/10/20, 11:19 PM:
---------------------------------------------------------------------
I agree with [~giskender] -- I'm not sure Option 1 can be made correct because
of the lack of locking when generating index updates client-side. Immutable
table partial writes can't even use the mutable path to do index generation
server-side because some _other_ client could be generating a full-row write
client-side at the same time that wouldn't be caught by the preBatchMutate
server-side row lock.
was (Author: gjacoby):
I agree with [~giskender] -- I'm not sure Option 1 can be made correct because
of the lack of locking when generating index updates client-side. You can't
even use the mutable path to do index generation server-side because some
_other_ client could be generating a full-row write client-side at the same
time that wouldn't be caught by the preBatchMutate server-side row lock.
> Supporting partial overwrites for immutable tables with indexes
> ---------------------------------------------------------------
>
> Key: PHOENIX-5768
> URL: https://issues.apache.org/jira/browse/PHOENIX-5768
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 5.0.0, 4.14.3
> Reporter: Kadir OZDEMIR
> Assignee: Kadir OZDEMIR
> Priority: Critical
>
> Phoenix allows immutable table with indexes to be overwritten partially as
> long as the indexed columns are not updated during partial overwrites.
> However, there is no check/enforcement for this. The immutable index
> mutations are prepared on the client side without reading the existing data
> table rows. This means the index mutations prepared by the client will be
> partial when the data table row mutations are partial. The new indexing
> design assumes index rows are always full and all cells within an index row
> have the same timestamp. On the read path, GlobalIndexChecker returns only
> the cells with the most recent timestamp of the row. This means that if the
> client updates the same row multiple times, the client will read back only
> the most recent update which could be partial.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)