aws / aws/aws-xray-sdk-python

Unhandled AttributeError if reservoir is None

Aperta
#222 16 commenti 0 reazioni 1 assegnatario Rivendicata da @srprash Vedi su GitHub
Lingua principale
Python
Stelle
338
Fork
147
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Calling `reservoir.borrow_or_take(now, rule.can_borrow)` leads to an `AttributeError` if `reservoir is None`. See screenshot (sentry) for details.

![image](https://user-images.githubusercontent.com/152008/80094217-674c7600-8555-11ea-97fd-fd5965b2c29c.png)

Looks like a race condition caused by merging rules. We saw this in production, but only once.

https://github.com/aws/aws-xray-sdk-python/blob/2d12c83383ea42e955ad530a7c18832c7881fb32/aws_xray_sdk/core/sampling/rule_cache.py#L47-L50

https://github.com/aws/aws-xray-sdk-python/blob/2d12c83383ea42e955ad530a7c18832c7881fb32/aws_xray_sdk/core/sampling/sampling_rule.py#L71-L80

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.