Skip to content

Commit

Permalink
A temporary workaround of executors being used as storage worker
Browse files Browse the repository at this point in the history
It's introduced by this commit: buildfarm#1328

Schedulers subscribe to Redis events and treat all new workers as storage worker. It will cause problem when they tries to upload data to them.
  • Loading branch information
congt committed Aug 14, 2024
1 parent 67552b0 commit 0090ef0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/build/buildfarm/worker/shard/Worker.java
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,14 @@ public void start() throws ConfigurationException, InterruptedException, IOExcep
healthStatusManager.setStatus(
HealthStatusManager.SERVICE_NAME_ALL_SERVICES, ServingStatus.SERVING);
PrometheusPublisher.startHttpServer(configs.getPrometheusPort());
startFailsafeRegistration();

// An executor can also be used as storage worker as scheduler treats all new workers as storage workers
// TODO (Congt) Fix it upstream and revert it.
if (configs.getWorker().getCapabilities().isCas()) {
startFailsafeRegistration();
} else {
log.log(INFO, "Skipping worker registration");
}

// Listen for pipeline unhandled exceptions
ExecutorService pipelineExceptionExecutor = newSingleThreadExecutor();
Expand Down

0 comments on commit 0090ef0

Please sign in to comment.