You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Shanthoosh Venkataraman (JIRA)" <ji...@apache.org> on 2018/04/27 08:09:00 UTC

[jira] [Created] (SAMZA-1689) Add state validations in ZkBarrierForVersionUpgrade.

Shanthoosh Venkataraman created SAMZA-1689:
----------------------------------------------

             Summary: Add state validations in ZkBarrierForVersionUpgrade. 
                 Key: SAMZA-1689
                 URL: https://issues.apache.org/jira/browse/SAMZA-1689
             Project: Samza
          Issue Type: Bug
            Reporter: Shanthoosh Venkataraman
            Assignee: Shanthoosh Venkataraman


A barrier in zookeeper can be in either DONE or TimedOut state. Existing ZkBarrier implemention doesn't have any state validations before acting upon the barrier events received from zookeeper. This can corrupt barrier states when any of the following occur:

A. When a stream processor joins a barrier marked as timed out by the leader of the group.
B. When the leader of a group expires a barrier marked as Done. This can happen when a leader plays out a stale events from its in-memory buffer.

This will cause the processors group to go through unnecessary rebalancing phase(worse, corrupt the barrier state).

Changes:
- Introduce a barrier state: NEW which will be the beginning state of a barrier(In existing implementation, barrier is created with empty/null value). Barrier will be marked as Done or TimedOut only if the current barrier state is NEW. 

- Fix the disabled barrier test cases. Add new test cases to validate the changed functionality. 
- Improve logging to aid debugging.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)