Details
Description
With Phoenix 4.14.1 client, There is a scenario where client would skip data table write but do successful index table write. In this case, we should treat it as Data loss scenario.
Relevant code path :-
Here is what happens :-
- Consider below assumptions for scenario :-
- max no row in single batch = 100
- max size of batch = 2 MB
- When client faces SQLException Code 1121, it sets variable shouldRetryIndexedMutation=true.
- In scenarios where client sends batch of 100 rows only as per configuration, but batch size is >2 MB, MutationState.java#991 will split this 100 row batch into multiple smaller batches which are <2MB.
- Suppose there are 5 batches of 20 rows but client faces 1121 SQLExceptionCode on 2nd batch , then it will set shouldRetryIndexedMutation=true and it will retry all 5 batches again with only Index updates. This will results in rows missing from Data table.