[
https://issues.apache.org/jira/browse/PHOENIX-3796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15974039#comment-15974039
]
Lars Hofhansl commented on PHOENIX-3796:
----------------------------------------
Software has bugs. No need to apologize. :)
There're actually two issues:
# _global_, mutable index updates were done inside the MVCC transaction. When
the index updates are slow, this causes a cascading effect across the cluster.
PHOENIX-3789 moves these out of the MVCC part. Again this is for global indexes.
# _local_ index updates were applied over and over again for each mutation in a
batch. That's what I'm trying to fix here.
Even before PHOENIX-3789 we wrote the remote index updates for global after the
WAL-sync., right? (or perhaps I am missing something). Or are you saying that
there is now a window where the updates to the main table are visible, but the
index updates are not? Before PHOENIX-3789 it was the other way round, right?
I.e. the index updates would be visible to client potentially before the main
table updates are visible.
Affecting changes to other server inside the write path is generally "bad" -
but unavoidable in the global index case; doing it inside the MVCC transaction
can lead to the cascading issues described. I do not see any other way out
other than moving all index updates out of the MVCC transaction (as done in
PHOENIX-3789).
With the change here, we actually no longer need the changes from PHOENIX-3789
(in fact this patch removes them).
> LocalIndexes apply the entire batch for each mutation in a batch
> ----------------------------------------------------------------
>
> Key: PHOENIX-3796
> URL: https://issues.apache.org/jira/browse/PHOENIX-3796
> Project: Phoenix
> Issue Type: Bug
> Reporter: Lars Hofhansl
> Attachments: 3796-4x.txt
>
>
> [~mujtabachohan] pointed out an "exponential" increase in update time in the
> size of the batch.
> Indeed when I look at the code in Indexer.java I see that for each call to
> postPut or postDelete we do insert the entire into the local index. (So for a
> batch of size 10000 we'd make 10000 index updates 10000 times)
> [~rajeshbabu]
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)