Skip to content

Commit d332f34

Browse files
authored
Merge pull request #266 from ydb-platform/discovery-log
debug messages for skipped discovery
2 parents d2e643d + 3ba7fbd commit d332f34

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* improve log
2+
13
## 1.16.2
24
* logged failed discovery refresh in `checkDiscovery` instead of silently swallowing the exception
35
* fixed discovery retry rate after a failure: a separate `lastDiscoveryAttempt` timer gates retries by `discoveryInterval()`, so a broken discovery no longer triggers `discover()` on every API request

src/Traits/RequestTrait.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,11 @@ protected function checkDiscovery(){
334334
// failure are gated by lastDiscoveryAttempt so a broken discovery
335335
// does not get called on every single API request.
336336
if ($now - $this->lastDiscovery <= $interval) {
337+
$this->logger()->debug('YDB: skip discovery by interval.');
337338
return;
338339
}
339340
if ($now - $this->lastDiscoveryAttempt <= $interval) {
341+
$this->logger()->debug('YDB: skip discovery by attempt interval.');
340342
return;
341343
}
342344

0 commit comments

Comments
 (0)