@@ -25,7 +25,6 @@ use std::time::Instant;
25
25
use async_channel:: Receiver ;
26
26
use chrono:: Duration ;
27
27
use chrono:: TimeDelta ;
28
- use databend_common_base:: base:: tokio;
29
28
use databend_common_base:: runtime:: GlobalIORuntime ;
30
29
use databend_common_catalog:: catalog:: StorageDescription ;
31
30
use databend_common_catalog:: plan:: DataSourcePlan ;
@@ -150,8 +149,6 @@ pub struct FuseTable {
150
149
type PartInfoReceiver = Option < Receiver < Result < PartInfoPtr > > > ;
151
150
152
151
// default schema refreshing timeout is 5 seconds.
153
- const DEFAULT_SCHEMA_REFRESHING_TIMEOUT : std:: time:: Duration = std:: time:: Duration :: from_secs ( 5 ) ;
154
-
155
152
impl FuseTable {
156
153
pub fn try_create ( table_info : TableInfo ) -> Result < Box < dyn Table > > {
157
154
Ok ( Self :: do_create_table_ext ( table_info, false ) ?)
@@ -485,7 +482,6 @@ impl FuseTable {
485
482
fn refresh_schema_from_hint (
486
483
operator : & Operator ,
487
484
storage_prefix : & str ,
488
- table_description : & str ,
489
485
) -> Result < Option < ( SnapshotHint , TableSchema ) > > {
490
486
let refresh_task = async {
491
487
let begin_load_hint = Instant :: now ( ) ;
@@ -529,24 +525,7 @@ impl FuseTable {
529
525
}
530
526
} ;
531
527
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)
550
529
}
551
530
552
531
fn refresh_table_info (
@@ -571,8 +550,7 @@ impl FuseTable {
571
550
table_info. ident
572
551
) ;
573
552
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) ?;
576
554
577
555
info ! (
578
556
"extracted snapshot location [{:?}] of table {}, with id {:?} from the last snapshot hint file." ,
0 commit comments