@@ -277,13 +277,22 @@ func (sm *streamManager) handleAddStream(st sttypes.Stream) error {
277
277
if sm .reservedStreams .size () < MaxReservedStreams {
278
278
if _ , ok := sm .reservedStreams .get (id ); ! ok {
279
279
sm .reservedStreams .addStream (st )
280
+ sm .logger .Info ().
281
+ Int ("NumStreams" , sm .streams .size ()).
282
+ Int ("NumReservedStreams" , sm .reservedStreams .size ()).
283
+ Interface ("StreamID" , id ).
284
+ Msg ("[StreamManager] added new stream to reserved list" )
280
285
}
281
286
return nil
282
287
}
283
288
return ErrTooManyStreams
284
289
}
285
290
286
291
sm .streams .addStream (st )
292
+ sm .logger .Info ().
293
+ Int ("NumStreams" , sm .streams .size ()).
294
+ Interface ("StreamID" , id ).
295
+ Msg ("[StreamManager] added new stream to main streams list" )
287
296
288
297
sm .addStreamFeed .Send (EvtStreamAdded {st })
289
298
addedStreamsCounterVec .With (prometheus.Labels {"topic" : string (sm .myProtoID )}).Inc ()
@@ -407,6 +416,11 @@ func (sm *streamManager) discover(ctx context.Context) (<-chan libp2p_peer.AddrI
407
416
if sm .config .HiCap - numStreams < sm .config .DiscBatch {
408
417
discBatch = sm .config .HiCap - numStreams
409
418
}
419
+ sm .logger .Debug ().
420
+ Interface ("protoID" , protoID ).
421
+ Int ("numStreams" , numStreams ).
422
+ Int ("discBatch" , discBatch ).
423
+ Msg ("[StreamManager] discovering" )
410
424
if discBatch < 0 {
411
425
return nil , nil
412
426
}
0 commit comments