Azure / Azure/azure-sdk-for-python

Prevent circular dependencies with singleton classes and logs

Aperta
#44,671 0 commenti 0 reazioni 1 assegnatario Rivendicata da @rads-1996 Vedi su GitHub
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g 2h
PR unite (30g)
213

Descrizione

[Discussion](https://github.com/Azure/azure-sdk-for-python/pull/44661#discussion_r2692435577)
[Example issue](https://github.com/langchain-ai/langchain-azure/issues/234)

The core of this issue is that logs that are produced during setup hit the Breeze or Performance Counter log record processor that may still be in the process of starting up. This can cause circular dependencies and permanent Singleton locks. While this issue has been prevented by reordering setup, we should explore some more root-level solutions. For instance, I think we should change Singleton accessing to return None if the lock is stuck. This would prevent a crash at the cost of a single log being uncounted for the given processor. Alternatively, we could change the Live Metric and Performance Counter processors to not rely on the manager singletons directly, but rather use another module that the singleton relies on, too. This way, the processors can be fully independent of the managers.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.