[ 
https://issues.apache.org/jira/browse/IMPALA-14670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18052227#comment-18052227
 ] 

ASF subversion and git services commented on IMPALA-14670:
----------------------------------------------------------

Commit d312091768f122e014d2292c25c1b26c2ba472d2 in impala's branch 
refs/heads/master from Venu Reddy
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=d31209176 ]

IMPALA-14670: Fix NullPointerException in getEventProcessorSummary

TEventBatchProgressInfo fields are populated from
MetastoreEventsProcessor state that may be updated concurrently during
event processing. To avoid inconsistent reads, the method is expected
to snapshot all required fields into local variables before using them.

However, currentFilteredEvent_ was accessed directly after a null
check, allowing it to become null concurrently and causing a
NullPointerException while populating the progress.

This change snapshots currentFilteredEvent_ into a local variable and
uses the local reference consistently, preventing the race condition.

Testing:
- Ran existing tests.

Change-Id: I3c9101811cd706e0eba487595852db3435232cf5
Reviewed-on: http://gerrit.cloudera.org:8080/23870
Reviewed-by: Quanlong Huang <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> test_self_events_with_hive_hierarchical fails with KeyError
> -----------------------------------------------------------
>
>                 Key: IMPALA-14670
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14670
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Pranav Yogi Lodha
>            Assignee: Venugopal Reddy K
>            Priority: Critical
>
> Error Message:
> KeyError: 'event_processor_metrics'
> Stacktrace:
> custom_cluster/test_events_custom_configs.py:570: in 
> test_self_events_with_hive_hierarchical
>     self._run_self_events_test(unique_database, {}, use_impala=False)
> custom_cluster/test_events_custom_configs.py:99: in _run_self_events_test
>     self._exec_sql_and_check_selfevent_counter(stmt, options, use_impala)
> custom_cluster/test_events_custom_configs.py:321: in 
> _exec_sql_and_check_selfevent_counter
>     EventProcessorUtils.wait_for_event_processing(self)
> util/event_processor_utils.py:92: in wait_for_event_processing
>     EventProcessorUtils.wait_for_event_processing_impl(test_suite.hive_client,
> util/event_processor_utils.py:106: in wait_for_event_processing_impl
>     EventProcessorUtils.wait_for_synced_event_id(timeout, 
> error_status_possible,
> util/event_processor_utils.py:59: in wait_for_synced_event_id
>     current_synced_id = EventProcessorUtils.get_last_synced_event_id()
> util/event_processor_utils.py:160: in get_last_synced_event_id
>     metrics = EventProcessorUtils.get_event_processor_metrics()
> util/event_processor_utils.py:123: in get_event_processor_metrics
>     metrics = varz_json["event_processor_metrics"].strip().splitlines()
> E   KeyError: 'event_processor_metrics'



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to