@@ -25,7 +25,6 @@ use std::time::Instant;
2525use async_channel:: Receiver ;
2626use chrono:: Duration ;
2727use chrono:: TimeDelta ;
28- use databend_common_base:: base:: tokio;
2928use databend_common_base:: runtime:: GlobalIORuntime ;
3029use databend_common_catalog:: catalog:: StorageDescription ;
3130use databend_common_catalog:: plan:: DataSourcePlan ;
@@ -150,8 +149,6 @@ pub struct FuseTable {
150149type PartInfoReceiver = Option < Receiver < Result < PartInfoPtr > > > ;
151150
152151// default schema refreshing timeout is 5 seconds.
153- const DEFAULT_SCHEMA_REFRESHING_TIMEOUT : std:: time:: Duration = std:: time:: Duration :: from_secs ( 5 ) ;
154-
155152impl FuseTable {
156153 pub fn try_create ( table_info : TableInfo ) -> Result < Box < dyn Table > > {
157154 Ok ( Self :: do_create_table_ext ( table_info, false ) ?)
@@ -485,7 +482,6 @@ impl FuseTable {
485482 fn refresh_schema_from_hint (
486483 operator : & Operator ,
487484 storage_prefix : & str ,
488- table_description : & str ,
489485 ) -> Result < Option < ( SnapshotHint , TableSchema ) > > {
490486 let refresh_task = async {
491487 let begin_load_hint = Instant :: now ( ) ;
@@ -529,24 +525,7 @@ impl FuseTable {
529525 }
530526 } ;
531527
532- let refresh_task_with_timeout = async {
533- tokio:: time:: timeout ( DEFAULT_SCHEMA_REFRESHING_TIMEOUT , refresh_task)
534- . await
535- . map_err ( |_e| {
536- ErrorCode :: RefreshTableInfoFailure ( format ! (
537- "failed to refresh table info {} in time" ,
538- table_description
539- ) )
540- } )
541- . map_err ( |e| {
542- ErrorCode :: RefreshTableInfoFailure ( format ! (
543- "failed to refresh table info {} : {}" ,
544- table_description, e
545- ) )
546- } ) ?
547- } ;
548-
549- GlobalIORuntime :: instance ( ) . block_on ( refresh_task_with_timeout)
528+ GlobalIORuntime :: instance ( ) . block_on ( refresh_task)
550529 }
551530
552531 fn refresh_table_info (
@@ -571,8 +550,7 @@ impl FuseTable {
571550 table_info. ident
572551 ) ;
573552
574- let snapshot_hint =
575- Self :: refresh_schema_from_hint ( operator, storage_prefix, & table_info. desc ) ?;
553+ let snapshot_hint = Self :: refresh_schema_from_hint ( operator, storage_prefix) ?;
576554
577555 info ! (
578556 "extracted snapshot location [{:?}] of table {}, with id {:?} from the last snapshot hint file." ,
0 commit comments