You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per #225, filing an additional ticket for this feature request. Thanks again!
Is your feature request related to a problem? Please describe.
The SysVCacheItemPool class points out that calling code should handle race conditions, but the FetchAuthTokenCache class, which is used by the google-cloud-php library when the authCache parameter is passed in (see here), does not do any locking.
This means that users that follow code examples such as the following (from here):
$authCache = newSysVCacheItemPool();
$sessionCache = newSysVCacheItemPool([
// Use a different project identifier for ftok than the default'proj' => 'B'
]);
$spanner = newSpannerClient([
'authCache' => $authCache
]);
...may run into race condition issues unknowingly.
Describe the solution you'd like
Either of the two:
FetchAuthTokenCache adds a locking mechanism to safely use the passed inCacheItemPoolInterface
I file an issue in the google-cloud-php repository to request it use a cache with locking built in.
The text was updated successfully, but these errors were encountered:
I am trying to fix this for v2.0 but I can't seem to recreate the error. I can add some locking to ftok, but I'd like to confirm the fix. I've done the following:
Per #225, filing an additional ticket for this feature request. Thanks again!
Is your feature request related to a problem? Please describe.
The SysVCacheItemPool class points out that calling code should handle race conditions, but the FetchAuthTokenCache class, which is used by the
google-cloud-php
library when theauthCache
parameter is passed in (see here), does not do any locking.This means that users that follow code examples such as the following (from here):
...may run into race condition issues unknowingly.
Describe the solution you'd like
Either of the two:
FetchAuthTokenCache
adds a locking mechanism to safely use the passed inCacheItemPoolInterface
The text was updated successfully, but these errors were encountered: