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

Quanlong Huang commented on IMPALA-12543:
-----------------------------------------

It seems a concurrent issue after we have IMPALA-12461 (part1). CC 
[~csringhofer]

Checked the logs of one occurrence, the self-event check for the ALTER_TABLE 
event was done before the in-flight catalog version was added to the in-flight 
version list. Before IMPALA-12461 (part1), both operations acquire the table 
lock. After IMPALA-12461 (part1), self-event check for non-partitioned tables 
don't acquire the table lock. So the concurrent issue could happen.

Here are the log analysis. In the console output of the test ([^std_err.txt]), 
the ALTER_TABLE event that causes the failure has event id 60358:
{noformat}
ALTER TABLE test_iceberg_self_events_aa5b394f.test_iceberg_events ADD COLUMN j 
INT;

-- 2024-01-08 17:27:42,035 INFO     MainThread: Started query 
ad431ceb72233c4a:a4b03a8400000000
-- 2024-01-08 17:27:42,190 INFO     MainThread: Waiting until events processor 
syncs to event id:60358
-- 2024-01-08 17:27:42,299 DEBUG    MainThread: Metric last-synced-event-id has 
reached the desired value: 60358{noformat}
It shouldn't refresh the table but it does. Checking the catalogd logs 
([^catalogd.INFO]), it's not considered as a self event:
{noformat}
I0108 17:27:42.154510 3279623 CatalogServiceCatalog.java:1137] Could not find 
version 1852 in in-flight event list of table 
test_iceberg_self_events_aa5b394f.test_iceberg_events
I0108 17:27:42.154734 3279623 MetastoreEvents.java:637] EventId: 60358 
EventType: ALTER_TABLE Change in number of columns detected for table 
test_iceberg_self_events_aa5b394f.test_iceberg_events from 1 to 2
I0108 17:27:42.158879 3279623 CatalogServiceCatalog.java:2642] Refreshing table 
metadata: test_iceberg_self_events_aa5b394f.test_iceberg_events{noformat}
The AlterTable statement starts before the check:
{noformat}
I0108 17:27:42.053027 3281027 JniUtil.java:166] 
ad431ceb72233c4a:a4b03a8400000000] execDdl request: ALTER_TABLE 
test_iceberg_self_events_aa5b394f.test_iceberg_events issued by jenkins
...
I0108 17:27:42.139672 3281027 HdfsTable.java:1251] 
ad431ceb72233c4a:a4b03a8400000000] Reloading metadata for table definition and 
all partition(s) of test_iceberg_self_events_aa5b394f.test_iceberg_events 
(ALTER TABLE ADD_COLUMNS){noformat}
and finishes and addes the version (1852) after the check:
{noformat}
I0108 17:27:42.165987 3281027 CatalogServiceCatalog.java:1185] 
ad431ceb72233c4a:a4b03a8400000000] Added catalog version 1852 in table's 
test_iceberg_self_events_aa5b394f.test_iceberg_events in-flight events
I0108 17:27:42.166616 3281027 JniUtil.java:177] 
ad431ceb72233c4a:a4b03a8400000000] Finished execDdl request: ALTER_TABLE 
test_iceberg_self_events_aa5b394f.test_iceberg_events issued by jenkins. Time 
spent: 114ms{noformat}
Uploaded the logs for reference.

> test_iceberg_self_events failed in JDK11 build
> ----------------------------------------------
>
>                 Key: IMPALA-12543
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12543
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Riza Suminto
>            Assignee: Riza Suminto
>            Priority: Major
>              Labels: broken-build
>         Attachments: catalogd.INFO, std_err.txt
>
>
> test_iceberg_self_events failed in JDK11 build with following error.
>  
> {code:java}
> Error Message
> assert 0 == 1
> Stacktrace
> custom_cluster/test_events_custom_configs.py:637: in test_iceberg_self_events
>     check_self_events("ALTER TABLE {0} ADD COLUMN j INT".format(tbl_name))
> custom_cluster/test_events_custom_configs.py:624: in check_self_events
>     assert tbls_refreshed_before == tbls_refreshed_after
> E   assert 0 == 1 {code}
> This test still pass before IMPALA-11387 merged.
>  



--
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