MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / run

Method run

src/compute/src/server.rs:355–365  ·  view source on GitHub ↗

Runs a compute worker.

(&mut self)

Source from the content-addressed store, hash-verified

353impl<'w> Worker<'w> {
354 /// Runs a compute worker.
355 pub fn run(&mut self) {
356 // The command receiver is initialized without an nonce, so receiving the first command
357 // always triggers a nonce change.
358 let NonceChange(nonce) = self.recv_command().expect_err("change to first nonce");
359 self.set_nonce(nonce);
360
361 loop {
362 let Err(NonceChange(nonce)) = self.run_client();
363 self.set_nonce(nonce);
364 }
365 }
366
367 fn set_nonce(&mut self, nonce: Uuid) {
368 self.response_tx.set_nonce(nonce);

Callers 15

run_roundtrip_testsFunction · 0.45
runFunction · 0.45
runFunction · 0.45
run_roundtrip_testsFunction · 0.45
datadrivenFunction · 0.45
runFunction · 0.45
role_update_middlewareFunction · 0.45
logging_middlewareFunction · 0.45
latency_middlewareFunction · 0.45
http_authFunction · 0.45
test_http_sqlFunction · 0.45

Calls 3

recv_commandMethod · 0.80
set_nonceMethod · 0.80
run_clientMethod · 0.45

Tested by 8

run_roundtrip_testsFunction · 0.36
runFunction · 0.36
runFunction · 0.36
run_roundtrip_testsFunction · 0.36
datadrivenFunction · 0.36
runFunction · 0.36
test_http_sqlFunction · 0.36
run_mcp_datadriven_innerFunction · 0.36