@@ -680,7 +680,7 @@ class LrsCallState {
680
680
681
681
private handleStreamStatus ( status : StatusObject ) {
682
682
this . client . trace (
683
- 'ADS stream ended. code=' + status . code + ' details= ' + status . details
683
+ 'LRS stream ended. code=' + status . code + ' details= ' + status . details
684
684
) ;
685
685
this . client . handleLrsStreamEnd ( ) ;
686
686
}
@@ -913,6 +913,7 @@ class XdsSingleServerClient {
913
913
if ( this . adsCallState || this . refcount < 1 ) {
914
914
return ;
915
915
}
916
+ this . trace ( 'Starting ADS stream' ) ;
916
917
const metadata = new Metadata ( { waitForReady : true } ) ;
917
918
const call = this . adsClient . StreamAggregatedResources ( metadata ) ;
918
919
this . adsCallState = new AdsCallState ( this , call , this . xdsClient . adsNode ! ) ;
@@ -937,6 +938,7 @@ class XdsSingleServerClient {
937
938
if ( this . lrsCallState || this . refcount < 1 || this . clusterStatsMap . size < 1 ) {
938
939
return ;
939
940
}
941
+ this . trace ( 'Starting LRS stream' ) ;
940
942
const metadata = new Metadata ( { waitForReady : true } ) ;
941
943
const call = this . lrsClient . StreamLoadStats ( metadata ) ;
942
944
this . lrsCallState = new LrsCallState ( this , call , this . xdsClient . lrsNode ! ) ;
@@ -976,11 +978,11 @@ class XdsSingleServerClient {
976
978
edsServiceName : string
977
979
) : XdsClusterDropStats {
978
980
this . trace ( 'addClusterDropStats(clusterName=' + clusterName + ', edsServiceName=' + edsServiceName + ')' ) ;
979
- this . maybeStartLrsStream ( ) ;
980
981
const clusterStats = this . clusterStatsMap . getOrCreate (
981
982
clusterName ,
982
983
edsServiceName
983
984
) ;
985
+ this . maybeStartLrsStream ( ) ;
984
986
return {
985
987
addUncategorizedCallDropped : ( ) => {
986
988
clusterStats . uncategorizedCallsDropped += 1 ;
@@ -1003,11 +1005,11 @@ class XdsSingleServerClient {
1003
1005
locality : Locality__Output
1004
1006
) : XdsClusterLocalityStats {
1005
1007
this . trace ( 'addClusterLocalityStats(clusterName=' + clusterName + ', edsServiceName=' + edsServiceName + ', locality=' + JSON . stringify ( locality ) + ')' ) ;
1006
- this . maybeStartLrsStream ( ) ;
1007
1008
const clusterStats = this . clusterStatsMap . getOrCreate (
1008
1009
clusterName ,
1009
1010
edsServiceName
1010
1011
) ;
1012
+ this . maybeStartLrsStream ( ) ;
1011
1013
let localityStats : ClusterLocalityStats | null = null ;
1012
1014
for ( const statsObj of clusterStats . localityStats ) {
1013
1015
if ( localityEqual ( locality , statsObj . locality ) ) {
0 commit comments