Skip to content

Commit

Permalink
monir fix
Browse files Browse the repository at this point in the history
  • Loading branch information
YifeiZhuang committed Nov 9, 2023
1 parent 80e25f5 commit aa19ae8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 3 additions & 1 deletion api/src/main/java/io/grpc/LoadBalancer.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ public abstract class LoadBalancer {
HEALTH_CONSUMER_LISTENER_ARG_KEY =
LoadBalancer.CreateSubchannelArgs.Key.create("internal:health-check-consumer-listener");

@Internal
public static final Attributes.Key<LoadBalancer.SubchannelStateListener>
HEALTH_PRODUCER_LISTENER_KEY = Attributes.Key.create("health-check-producer");
HEALTH_PRODUCER_LISTENER_KEY =
Attributes.Key.create("internal:health-check-producer-listener");

public static final SubchannelPicker EMPTY_PICKER = new SubchannelPicker() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static com.google.common.base.Preconditions.checkState;
import static io.grpc.ClientStreamTracer.NAME_RESOLUTION_DELAYED;
import static io.grpc.ConnectivityState.IDLE;
import static io.grpc.ConnectivityState.READY;
import static io.grpc.ConnectivityState.SHUTDOWN;
import static io.grpc.ConnectivityState.TRANSIENT_FAILURE;
import static io.grpc.EquivalentAddressGroup.ATTR_AUTHORITY_OVERRIDE;
Expand Down
3 changes: 2 additions & 1 deletion util/src/main/java/io/grpc/util/HealthProducerUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,13 @@ private void notifyHealth() {
} else if (ConnectivityState.READY == upperStreamHealthStatus.getState()) {
next = thisHealthState;
} else if (ConnectivityState.TRANSIENT_FAILURE == upperStreamHealthStatus.getState()) {
log.log(Level.FINE, "todo: add producer name in description " + healthProducerName);
// todo: include producer name and upper stream health status in description
next = ConnectivityStateInfo.forTransientFailure(Status.UNAVAILABLE.withDescription(
thisHealthState.getStatus().getDescription()));
}
if (!Objects.equal(concludedHealthStatus, next)) {
concludedHealthStatus = next;
log.log(Level.FINE, "Health producer " + healthProducerName + ":" + next);
delegate.onSubchannelState(next);
}
}
Expand Down
3 changes: 0 additions & 3 deletions util/src/main/java/io/grpc/util/MultiChildLoadBalancer.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@
public abstract class MultiChildLoadBalancer extends LoadBalancer {

private static final Logger logger = Logger.getLogger(MultiChildLoadBalancer.class.getName());



private final Map<Object, ChildLbState> childLbStates = new LinkedHashMap<>();
private final Helper helper;
// Set to true if currently in the process of handling resolved addresses.
Expand Down

0 comments on commit aa19ae8

Please sign in to comment.