[jira] [Commented] (IMPALA-13003) Server exits early failing to create impala_query_log with AlreadyExistsException

2024-04-22 Thread ASF subversion and git services (Jira)


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

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

Commit 1a90388b19500289fbb8c3765aee9a8882ae3c04 in impala's branch 
refs/heads/branch-4.4.0 from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=1a90388b1 ]

IMPALA-13003: Handle Iceberg AlreadyExistsException

When multiple coordinators attempt to create the same table concurrently
with "if not exists", we still see

  AlreadyExistsException: Table was created concurrently: my_iceberg_tbl

Iceberg throws its own version of AlreadyExistsException, but we avoid
most code paths that would throw it because we first check HMS to see if
the table exists before trying to create it.

Updates createIcebergTable to handle Iceberg's AlreadyExistsException
identically to the HMS AlreadyExistsException.

Adds a test using DebugAction to simulate concurrent table creation.

Change-Id: I847eea9297c9ee0d8e821fe1c87ea03d22f1d96e
Reviewed-on: http://gerrit.cloudera.org:8080/21312
Reviewed-by: Impala Public Jenkins 
Tested-by: Impala Public Jenkins 


> Server exits early failing to create impala_query_log with 
> AlreadyExistsException
> -
>
> Key: IMPALA-13003
> URL: https://issues.apache.org/jira/browse/IMPALA-13003
> Project: IMPALA
>  Issue Type: Bug
>  Components: be
>Affects Versions: Impala 4.4.0
>Reporter: Andrew Sherman
>Assignee: Michael Smith
>Priority: Critical
>  Labels: iceberg, workload-management
> Fix For: Impala 4.4.0
>
>
> At startup workload management tries to create the query log table here:
> {code:java}
>   // The initialization code only works when run in a separate thread for 
> reasons unknown.
>   ABORT_IF_ERROR(SetupDbTable(internal_server_.get(), table_name));
> {code}
> This code is exiting:
> {code:java}
> I0413 23:40:05.183876 21006 client-request-state.cc:1348] 
> 1d4878dbc9214c81:6dc8cc2e] ImpalaRuntimeException: Error making 
> 'createTable' RPC to Hive Metastore:
> CAUSED BY: AlreadyExistsException: Table was created concurrently: 
> sys.impala_query_log
> I0413 23:40:05.184055 20955 impala-server.cc:2582] Connection 
> 27432606d99dcdae:218860164eb206bb from client in-memory.localhost:0 to server 
> internal-server closed. The connection had 1 associated session(s).
> I0413 23:40:05.184067 20955 impala-server.cc:1780] Closing session: 
> 27432606d99dcdae:218860164eb206bb
> I0413 23:40:05.184083 20955 impala-server.cc:1836] Closed session: 
> 27432606d99dcdae:218860164eb206bb, client address: .
> F0413 23:40:05.184111 20955 workload-management.cc:304] query timed out 
> waiting for results
> . Impalad exiting.
> I0413 23:40:05.184728 20883 impala-server.cc:1564] Query successfully 
> unregistered: query_id=1d4878dbc9214c81:6dc8cc2e
> Minidump in thread [20955]completed-queries running query 
> :, fragment instance 
> :
> Wrote minidump to 
> /data/jenkins/workspace/impala-cdw-master-core-ubsan/repos/Impala/logs/custom_cluster_tests/minidumps/impalad/402f37cc-4663-4c78-086ca295-a9e5943c.dmp
> {code}
> with stack
> {code:java}
> F0413 23:40:05.184111 20955 workload-management.cc:304] query timed out 
> waiting for results
> . Impalad exiting.
> *** Check failure stack trace: ***
> @  0x8e96a4d  google::LogMessage::Fail()
> @  0x8e98984  google::LogMessage::SendToLog()
> @  0x8e9642c  google::LogMessage::Flush()
> @  0x8e98ea9  google::LogMessageFatal::~LogMessageFatal()
> @  0x3da3a9a  impala::ImpalaServer::CompletedQueriesThread()
> @  0x3a8df93  boost::_mfi::mf0<>::operator()()
> @  0x3a8de97  boost::_bi::list1<>::operator()<>()
> @  0x3a8dd77  boost::_bi::bind_t<>::operator()()
> @  0x3a8d672  
> boost::detail::function::void_function_obj_invoker0<>::invoke()
> @  0x301e7d0  boost::function0<>::operator()()
> @  0x43ce415  impala::Thread::SuperviseThread()
> @  0x43e2dc7  boost::_bi::list5<>::operator()<>()
> @  0x43e29e7  boost::_bi::bind_t<>::operator()()
> @  0x43e21c5  boost::detail::thread_data<>::run()
> @  0x7984c37  thread_proxy
> @ 0x7f75b6982ea5  start_thread
> @ 0x7f75b36a7b0d  __clone
> Picked up JAVA_TOOL_OPTIONS: 
> -agentlib:jdwp=transport=dt_socket,address=3,server=y,suspend=n   
> -Dsun.java.command=impalad
> Minidump in thread [20955]completed-queries running query 
> :, fragment instance 
> :
> {code}
> I think the key error is 
> 

[jira] [Commented] (IMPALA-13003) Server exits early failing to create impala_query_log with AlreadyExistsException

2024-04-17 Thread ASF subversion and git services (Jira)


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

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

Commit bbe3303ded1e7a796e6bc41648b89074c52b1e7e in impala's branch 
refs/heads/master from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=bbe3303de ]

IMPALA-13003: Handle Iceberg AlreadyExistsException

When multiple coordinators attempt to create the same table concurrently
with "if not exists", we still see

  AlreadyExistsException: Table was created concurrently: my_iceberg_tbl

Iceberg throws its own version of AlreadyExistsException, but we avoid
most code paths that would throw it because we first check HMS to see if
the table exists before trying to create it.

Updates createIcebergTable to handle Iceberg's AlreadyExistsException
identically to the HMS AlreadyExistsException.

Adds a test using DebugAction to simulate concurrent table creation.

Change-Id: I847eea9297c9ee0d8e821fe1c87ea03d22f1d96e
Reviewed-on: http://gerrit.cloudera.org:8080/21312
Reviewed-by: Impala Public Jenkins 
Tested-by: Impala Public Jenkins 


> Server exits early failing to create impala_query_log with 
> AlreadyExistsException
> -
>
> Key: IMPALA-13003
> URL: https://issues.apache.org/jira/browse/IMPALA-13003
> Project: IMPALA
>  Issue Type: Bug
>  Components: be
>Affects Versions: Impala 4.4.0
>Reporter: Andrew Sherman
>Assignee: Michael Smith
>Priority: Critical
>  Labels: iceberg, workload-management
> Fix For: Impala 4.4.0
>
>
> At startup workload management tries to create the query log table here:
> {code:java}
>   // The initialization code only works when run in a separate thread for 
> reasons unknown.
>   ABORT_IF_ERROR(SetupDbTable(internal_server_.get(), table_name));
> {code}
> This code is exiting:
> {code:java}
> I0413 23:40:05.183876 21006 client-request-state.cc:1348] 
> 1d4878dbc9214c81:6dc8cc2e] ImpalaRuntimeException: Error making 
> 'createTable' RPC to Hive Metastore:
> CAUSED BY: AlreadyExistsException: Table was created concurrently: 
> sys.impala_query_log
> I0413 23:40:05.184055 20955 impala-server.cc:2582] Connection 
> 27432606d99dcdae:218860164eb206bb from client in-memory.localhost:0 to server 
> internal-server closed. The connection had 1 associated session(s).
> I0413 23:40:05.184067 20955 impala-server.cc:1780] Closing session: 
> 27432606d99dcdae:218860164eb206bb
> I0413 23:40:05.184083 20955 impala-server.cc:1836] Closed session: 
> 27432606d99dcdae:218860164eb206bb, client address: .
> F0413 23:40:05.184111 20955 workload-management.cc:304] query timed out 
> waiting for results
> . Impalad exiting.
> I0413 23:40:05.184728 20883 impala-server.cc:1564] Query successfully 
> unregistered: query_id=1d4878dbc9214c81:6dc8cc2e
> Minidump in thread [20955]completed-queries running query 
> :, fragment instance 
> :
> Wrote minidump to 
> /data/jenkins/workspace/impala-cdw-master-core-ubsan/repos/Impala/logs/custom_cluster_tests/minidumps/impalad/402f37cc-4663-4c78-086ca295-a9e5943c.dmp
> {code}
> with stack
> {code:java}
> F0413 23:40:05.184111 20955 workload-management.cc:304] query timed out 
> waiting for results
> . Impalad exiting.
> *** Check failure stack trace: ***
> @  0x8e96a4d  google::LogMessage::Fail()
> @  0x8e98984  google::LogMessage::SendToLog()
> @  0x8e9642c  google::LogMessage::Flush()
> @  0x8e98ea9  google::LogMessageFatal::~LogMessageFatal()
> @  0x3da3a9a  impala::ImpalaServer::CompletedQueriesThread()
> @  0x3a8df93  boost::_mfi::mf0<>::operator()()
> @  0x3a8de97  boost::_bi::list1<>::operator()<>()
> @  0x3a8dd77  boost::_bi::bind_t<>::operator()()
> @  0x3a8d672  
> boost::detail::function::void_function_obj_invoker0<>::invoke()
> @  0x301e7d0  boost::function0<>::operator()()
> @  0x43ce415  impala::Thread::SuperviseThread()
> @  0x43e2dc7  boost::_bi::list5<>::operator()<>()
> @  0x43e29e7  boost::_bi::bind_t<>::operator()()
> @  0x43e21c5  boost::detail::thread_data<>::run()
> @  0x7984c37  thread_proxy
> @ 0x7f75b6982ea5  start_thread
> @ 0x7f75b36a7b0d  __clone
> Picked up JAVA_TOOL_OPTIONS: 
> -agentlib:jdwp=transport=dt_socket,address=3,server=y,suspend=n   
> -Dsun.java.command=impalad
> Minidump in thread [20955]completed-queries running query 
> :, fragment instance 
> :
> {code}
> I think the key error is 
> {code}
> 

[jira] [Commented] (IMPALA-13003) Server exits early failing to create impala_query_log with AlreadyExistsException

2024-04-16 Thread Michael Smith (Jira)


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

Michael Smith commented on IMPALA-13003:


This looks to be a generic iceberg issue. In this case the 
AlreadyExistsException comes from 
https://github.com/apache/iceberg/blob/apache-iceberg-1.4.3/core/src/main/java/org/apache/iceberg/BaseMetastoreCatalog.java#L201.
 
https://github.com/apache/impala/blob/4.4.0-rc1/fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java#L4045
 handles {{org.apache.hadoop.hive.metastore.api.AlreadyExistsException}}, but 
not {{org.apache.iceberg.exceptions.AlreadyExistsException}}, so we likely need 
to add that as well. I should be able to rig up a debug action to reproduce 
this.

> Server exits early failing to create impala_query_log with 
> AlreadyExistsException
> -
>
> Key: IMPALA-13003
> URL: https://issues.apache.org/jira/browse/IMPALA-13003
> Project: IMPALA
>  Issue Type: Bug
>  Components: be
>Affects Versions: Impala 4.4.0
>Reporter: Andrew Sherman
>Assignee: Michael Smith
>Priority: Critical
>
> At startup workload management tries to create the query log table here:
> {code:java}
>   // The initialization code only works when run in a separate thread for 
> reasons unknown.
>   ABORT_IF_ERROR(SetupDbTable(internal_server_.get(), table_name));
> {code}
> This code is exiting:
> {code:java}
> I0413 23:40:05.183876 21006 client-request-state.cc:1348] 
> 1d4878dbc9214c81:6dc8cc2e] ImpalaRuntimeException: Error making 
> 'createTable' RPC to Hive Metastore:
> CAUSED BY: AlreadyExistsException: Table was created concurrently: 
> sys.impala_query_log
> I0413 23:40:05.184055 20955 impala-server.cc:2582] Connection 
> 27432606d99dcdae:218860164eb206bb from client in-memory.localhost:0 to server 
> internal-server closed. The connection had 1 associated session(s).
> I0413 23:40:05.184067 20955 impala-server.cc:1780] Closing session: 
> 27432606d99dcdae:218860164eb206bb
> I0413 23:40:05.184083 20955 impala-server.cc:1836] Closed session: 
> 27432606d99dcdae:218860164eb206bb, client address: .
> F0413 23:40:05.184111 20955 workload-management.cc:304] query timed out 
> waiting for results
> . Impalad exiting.
> I0413 23:40:05.184728 20883 impala-server.cc:1564] Query successfully 
> unregistered: query_id=1d4878dbc9214c81:6dc8cc2e
> Minidump in thread [20955]completed-queries running query 
> :, fragment instance 
> :
> Wrote minidump to 
> /data/jenkins/workspace/impala-cdw-master-core-ubsan/repos/Impala/logs/custom_cluster_tests/minidumps/impalad/402f37cc-4663-4c78-086ca295-a9e5943c.dmp
> {code}
> with stack
> {code:java}
> F0413 23:40:05.184111 20955 workload-management.cc:304] query timed out 
> waiting for results
> . Impalad exiting.
> *** Check failure stack trace: ***
> @  0x8e96a4d  google::LogMessage::Fail()
> @  0x8e98984  google::LogMessage::SendToLog()
> @  0x8e9642c  google::LogMessage::Flush()
> @  0x8e98ea9  google::LogMessageFatal::~LogMessageFatal()
> @  0x3da3a9a  impala::ImpalaServer::CompletedQueriesThread()
> @  0x3a8df93  boost::_mfi::mf0<>::operator()()
> @  0x3a8de97  boost::_bi::list1<>::operator()<>()
> @  0x3a8dd77  boost::_bi::bind_t<>::operator()()
> @  0x3a8d672  
> boost::detail::function::void_function_obj_invoker0<>::invoke()
> @  0x301e7d0  boost::function0<>::operator()()
> @  0x43ce415  impala::Thread::SuperviseThread()
> @  0x43e2dc7  boost::_bi::list5<>::operator()<>()
> @  0x43e29e7  boost::_bi::bind_t<>::operator()()
> @  0x43e21c5  boost::detail::thread_data<>::run()
> @  0x7984c37  thread_proxy
> @ 0x7f75b6982ea5  start_thread
> @ 0x7f75b36a7b0d  __clone
> Picked up JAVA_TOOL_OPTIONS: 
> -agentlib:jdwp=transport=dt_socket,address=3,server=y,suspend=n   
> -Dsun.java.command=impalad
> Minidump in thread [20955]completed-queries running query 
> :, fragment instance 
> :
> {code}
> I think the key error is 
> {code}
> CAUSED BY: AlreadyExistsException: Table was created concurrently: 
> sys.impala_query_log
> {code}
> which suggests that creating the table with "if not exists" is not sufficient 
> to protect against concurrent creations.



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

-
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org