@@ -113,7 +113,11 @@ func main() {
113113 }
114114
115115 // Create a new retrieval service to prepare a data directory and start snapshotting.
116- retrievalSvc := retrieval .New (cfg , engProps , docker , pm , tm , runner )
116+ retrievalSvc , err := retrieval .New (cfg , engProps , docker , pm , tm , runner )
117+ if err != nil {
118+ log .Errf (errors .WithMessage (err , `error in the "retrieval" section of the config` ).Error ())
119+ return
120+ }
117121
118122 // Create a cloning service to provision new clones.
119123 provisioner , err := provision .New (ctx , & cfg .Provision , dbCfg , docker , pm , engProps .InstanceID , internalNetworkID )
@@ -146,7 +150,7 @@ func main() {
146150 EngineVersion : version .GetVersion (),
147151 DBVersion : provisioner .DetectDBVersion (),
148152 Pools : pm .CollectPoolStat (),
149- Restore : retrievalSvc .CollectRestoreTelemetry (),
153+ Restore : retrievalSvc .ReportState (),
150154 })
151155
152156 embeddedUI := embeddedui .New (cfg .EmbeddedUI , engProps , runner , docker )
@@ -233,7 +237,8 @@ func reloadConfig(ctx context.Context, provisionSvc *provision.Provisioner, tm *
233237 return err
234238 }
235239
236- if err := retrieval .IsValidConfig (cfg ); err != nil {
240+ newRetrievalConfig , err := retrieval .ValidateConfig (& cfg .Retrieval )
241+ if err != nil {
237242 return err
238243 }
239244
@@ -257,7 +262,7 @@ func reloadConfig(ctx context.Context, provisionSvc *provision.Provisioner, tm *
257262
258263 provisionSvc .Reload (cfg .Provision , dbCfg )
259264 tm .Reload (cfg .Global )
260- retrievalSvc .Reload (ctx , cfg )
265+ retrievalSvc .Reload (ctx , newRetrievalConfig )
261266 cloningSvc .Reload (cfg .Cloning )
262267 platformSvc .Reload (newPlatformSvc )
263268 est .Reload (cfg .Estimator )
0 commit comments