@@ -46,63 +46,64 @@ impl ConfigureNamespace for LibsqlWalReplicaConfigurator {
46
46
store : NamespaceStore ,
47
47
broadcaster : BroadcasterHandle ,
48
48
) -> Pin < Box < dyn Future < Output = crate :: Result < Namespace > > + Send + ' a > > {
49
- Box :: pin ( async move {
50
- tracing:: debug!( "creating replica namespace" ) ;
51
- let db_path = self . base . base_path . join ( "dbs" ) . join ( name. as_str ( ) ) ;
52
- let channel = self . channel . clone ( ) ;
53
- let uri = self . uri . clone ( ) ;
54
-
55
- let rpc_client = ReplicationLogClient :: with_origin ( channel. clone ( ) , uri. clone ( ) ) ;
56
- // TODO! setup replication
57
-
58
- let mut join_set = JoinSet :: new ( ) ;
59
- let namespace = name. clone ( ) ;
60
-
61
- let stats = make_stats (
62
- & db_path,
63
- & mut join_set,
64
- db_config. clone ( ) ,
65
- self . base . stats_sender . clone ( ) ,
66
- name. clone ( ) ,
67
- applied_frame_no_receiver. clone ( ) ,
68
- )
69
- . await ?;
70
-
71
- let connection_maker = MakeWriteProxyConn :: new (
72
- db_path. clone ( ) ,
73
- self . base . extensions . clone ( ) ,
74
- channel. clone ( ) ,
75
- uri. clone ( ) ,
76
- stats. clone ( ) ,
77
- broadcaster,
78
- db_config. clone ( ) ,
79
- applied_frame_no_receiver,
80
- self . base . max_response_size ,
81
- self . base . max_total_response_size ,
82
- primary_current_replication_index,
83
- None ,
84
- resolve_attach_path,
85
- self . make_wal_manager . clone ( ) ,
86
- )
87
- . await ?
88
- . throttled (
89
- self . base . max_concurrent_connections . clone ( ) ,
90
- Some ( DB_CREATE_TIMEOUT ) ,
91
- self . base . max_total_response_size ,
92
- self . base . max_concurrent_requests ,
93
- ) ;
94
-
95
- Ok ( Namespace {
96
- tasks : join_set,
97
- db : Database :: Replica ( ReplicaDatabase {
98
- connection_maker : Arc :: new ( connection_maker) ,
99
- } ) ,
100
- name : name. clone ( ) ,
101
- stats,
102
- db_config_store : db_config,
103
- path : db_path. into ( ) ,
104
- } )
105
- } )
49
+ todo ! ( )
50
+ // Box::pin(async move {
51
+ // tracing::debug!("creating replica namespace");
52
+ // let db_path = self.base.base_path.join("dbs").join(name.as_str());
53
+ // let channel = self.channel.clone();
54
+ // let uri = self.uri.clone();
55
+ //
56
+ // let rpc_client = ReplicationLogClient::with_origin(channel.clone(), uri.clone());
57
+ // // TODO! setup replication
58
+ //
59
+ // let mut join_set = JoinSet::new();
60
+ // let namespace = name.clone();
61
+ //
62
+ // let stats = make_stats(
63
+ // &db_path,
64
+ // &mut join_set,
65
+ // db_config.clone(),
66
+ // self.base.stats_sender.clone(),
67
+ // name.clone(),
68
+ // applied_frame_no_receiver.clone(),
69
+ // )
70
+ // .await?;
71
+ //
72
+ // let connection_maker = MakeWriteProxyConn::new(
73
+ // db_path.clone(),
74
+ // self.base.extensions.clone(),
75
+ // channel.clone(),
76
+ // uri.clone(),
77
+ // stats.clone(),
78
+ // broadcaster,
79
+ // db_config.clone(),
80
+ // applied_frame_no_receiver,
81
+ // self.base.max_response_size,
82
+ // self.base.max_total_response_size,
83
+ // primary_current_replication_index,
84
+ // None,
85
+ // resolve_attach_path,
86
+ // self.make_wal_manager.clone(),
87
+ // )
88
+ // .await?
89
+ // .throttled(
90
+ // self.base.max_concurrent_connections.clone(),
91
+ // Some(DB_CREATE_TIMEOUT),
92
+ // self.base.max_total_response_size,
93
+ // self.base.max_concurrent_requests,
94
+ // );
95
+ //
96
+ // Ok(Namespace {
97
+ // tasks: join_set,
98
+ // db: Database::Replica(ReplicaDatabase {
99
+ // connection_maker: Arc::new(connection_maker),
100
+ // }),
101
+ // name: name.clone(),
102
+ // stats,
103
+ // db_config_store: db_config,
104
+ // path: db_path.into(),
105
+ // })
106
+ // })
106
107
}
107
108
108
109
fn cleanup < ' a > (
0 commit comments