Skip to content

Commit 21d58bf

Browse files
committed
Update
1 parent 8593a5e commit 21d58bf

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Retry/Retry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function retry(Closure $closure, bool $idempotent)
8989
}
9090
$retryCount++;
9191
$lastException = $e;
92-
$delay = $this->retryDelay($retryCount, $this->backoffType($e))*1000; // in microseconds
92+
$delay = $this->retryDelay($retryCount, $this->backoffType($e))*1000;
9393
usleep($delay);
9494
}
9595
}

src/Table.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,7 @@ public function retrySession(Closure $userFunc, bool $idempotent = false, RetryP
483483

484484
public function retryTransaction(Closure $userFunc, bool $idempotent = false, RetryParams $params = null){
485485

486-
return $this->retry->withParams($params)->retry(function () use ($params, $idempotent, $userFunc){
487-
$this->retrySession(function (Session $session) use ($userFunc) {
486+
return $this->retrySession(function (Session $session) use ($userFunc) {
488487
try{
489488
$session->beginTransaction();
490489
$result = $userFunc($session);
@@ -497,7 +496,6 @@ public function retryTransaction(Closure $userFunc, bool $idempotent = false, Re
497496
throw $exception;
498497
}
499498
}, $idempotent, $params);
500-
}, $idempotent);
501499

502500
}
503501

src/Traits/RequestTrait.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ protected function doStreamRequest($service, $method, $data = [])
116116
{
117117
$this->checkDiscovery();
118118

119+
$this->meta['x-ydb-auth-ticket'] = [$this->credentials->token()];
120+
119121
if (method_exists($this, 'take')) {
120122
$this->take();
121123
}
@@ -171,7 +173,7 @@ protected function handleGrpcStatus($service, $method, $status)
171173
(isset(self::$grpcExceptions[$status->code])?self::$grpcNames[$status->code]:$status->code)
172174
.' ' . $status->code . '): ' . ($status->details ?? 'no details');
173175
$this->logger->error($message);
174-
if ($this->ydb->needDiscovery()&&get_class($this)!==Discovery::class){
176+
if ($this->ydb->needDiscovery()){
175177
try{
176178
$this->ydb->discover();
177179
}catch (\Exception $e){}

0 commit comments

Comments
 (0)