You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Vihang Karajgaonkar (Code Review)" <ge...@cloudera.org> on 2019/03/05 01:46:46 UTC

[Impala-ASF-CR] IMPALA-8278 : Fix MetastoreEventsProcessorTest flakiness

Vihang Karajgaonkar has uploaded a new patch set (#7). ( http://gerrit.cloudera.org:8080/12656 )

Change subject: IMPALA-8278 : Fix MetastoreEventsProcessorTest flakiness
......................................................................

IMPALA-8278 : Fix MetastoreEventsProcessorTest flakiness

MetastoreEventsProcessorTest#testEventProcessorFetchAfterHMSRestart
causes test flakiness because the event processor instantiated is not
stopped. This causes the test to have 2 instances of EventsProcessor
running concurrently during the test execution. Depending on the timing
of the poll operations all the events are processed twice and they
modify the state of test catalog concurrently causing race conditions
which lead to intermittent test failures.

The patch also fixes a race condition in testEventSyncFlagTurnedOnErrorCase
where the test assumes and all the tables will be available in catalog
immediately after reset() completes. This assumption is not true and
hence removed the flaky assertNull check in there.

Also, changes the MetastoreEventsProcessorTest to make it easier to
debug through logs. Each individual test case uses a different table so
that logs pertaining to a test case can be easily grepped.

Testing done:
1. Confirmed that two event processors are running by manually adding
identifiers to each event processing and log them when they receive the
events before this patch. After patch same test does not reveal multiple
event processors running.
2. Ran the test multiple times locally to confirm that test works
everytime.
3. Running full-tests using jenkins job.

Change-Id: Ia12b1d048d8c8c59fa4c587bf65772ff194d314d
---
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/events/ExternalEventsProcessor.java
M fe/src/main/java/org/apache/impala/catalog/events/MetastoreEventsProcessor.java
M fe/src/main/java/org/apache/impala/catalog/events/NoOpEventProcessor.java
M fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java
5 files changed, 173 insertions(+), 140 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/56/12656/7
-- 
To view, visit http://gerrit.cloudera.org:8080/12656
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia12b1d048d8c8c59fa4c587bf65772ff194d314d
Gerrit-Change-Number: 12656
Gerrit-PatchSet: 7
Gerrit-Owner: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bh...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>