Skip to content

Commit

Permalink
Flag renamed to isProducerFenced
Browse files Browse the repository at this point in the history
  • Loading branch information
mukesh-ctds authored and srinath-ctds committed Jan 13, 2025
1 parent 263ab46 commit 4d57ccd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class FunctionMetaDataManager implements AutoCloseable {
@Getter
private CompletableFuture<Void> isInitialized = new CompletableFuture<>();

private boolean isFunctionWorkerAlive = true;
private boolean isProducerFenced = true;

public FunctionMetaDataManager(WorkerConfig workerConfig,
SchedulerManager schedulerManager,
Expand Down Expand Up @@ -247,7 +247,7 @@ public synchronized void updateFunctionOnLeader(FunctionMetaData functionMetaDat
} catch (Exception e) {
if (e.getCause() instanceof PulsarClientException.ProducerFencedException) {
log.error("Function worker status has been set to false due to ProducerFencedException.");
this.isFunctionWorkerAlive = false;
this.isProducerFenced = false;
}
log.error("Could not write into Function Metadata topic", e);
throw new IllegalStateException("Internal Error updating function at the leader", e);
Expand Down Expand Up @@ -508,6 +508,6 @@ private void initializeTailer() throws PulsarClientException {
}

public boolean checkLiveliness() {
return this.isFunctionWorkerAlive;
return this.isProducerFenced;
}
}

0 comments on commit 4d57ccd

Please sign in to comment.